Skip to content

Commit 2423dbb

Browse files
authored
Merge pull request #1 from lxqt/master
Fix possible crash when accesing destroyed objects (#471)
2 parents 56955b5 + 8e8a622 commit 2423dbb

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/Emulation.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ Emulation::Emulation() :
7272
connect(this , SIGNAL(programBracketedPasteModeChanged(bool)) ,
7373
SLOT(bracketedPasteModeChanged(bool)));
7474

75-
connect(this, &Emulation::cursorChanged, [this] (KeyboardCursorShape cursorShape, bool blinkingCursorEnabled) {
75+
connect(this, &Emulation::cursorChanged, this, [this] (KeyboardCursorShape cursorShape, bool blinkingCursorEnabled) {
7676
emit titleChanged( 50, QString(QLatin1String("CursorShape=%1;BlinkingCursorEnabled=%2"))
7777
.arg(static_cast<int>(cursorShape)).arg(blinkingCursorEnabled) );
7878
});

lib/qtermwidget.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,7 @@ void QTermWidget::init(int startnow)
324324
this, SIGNAL(termGetFocus()));
325325
connect(m_impl->m_terminalDisplay, SIGNAL(termLostFocus()),
326326
this, SIGNAL(termLostFocus()));
327-
connect(m_impl->m_terminalDisplay, &TerminalDisplay::keyPressedSignal,
327+
connect(m_impl->m_terminalDisplay, &TerminalDisplay::keyPressedSignal, this,
328328
[this] (QKeyEvent* e, bool) { Q_EMIT termKeyPressed(e); });
329329
// m_impl->m_terminalDisplay->setSize(80, 40);
330330

0 commit comments

Comments
 (0)