mirror of
https://bitbucket.org/smil3y/katie.git
synced 2025-02-24 02:42:55 +00:00
don't crash in debugger if QScriptEngine is deleted
upstream commits:
0a4e802f18
.patch
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
e012cdc1a0
commit
020b98780f
2 changed files with 3 additions and 1 deletions
|
@ -154,6 +154,7 @@ void QScriptDebuggerBackendPrivate::postEvent(QEvent *e)
|
|||
{
|
||||
if (!eventReceiver) {
|
||||
eventReceiver = new QScriptDebuggerBackendEventReceiver(this);
|
||||
Q_ASSERT(agent != 0);
|
||||
eventReceiver->moveToThread(agent->engine()->thread());
|
||||
}
|
||||
QCoreApplication::postEvent(eventReceiver, e);
|
||||
|
|
|
@ -201,6 +201,7 @@ QScriptEngineDebuggerBackend::~QScriptEngineDebuggerBackend()
|
|||
void QScriptEngineDebuggerBackend::processCommand(int id, const QScriptDebuggerCommand &command)
|
||||
{
|
||||
Q_D(QScriptEngineDebuggerBackend);
|
||||
if (d->agent)
|
||||
d->postEvent(new QScriptDebuggerCommandEvent(id, command));
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue