summaryrefslogtreecommitdiffstats
path: root/src/declarative/debugger/qmldebug.cpp
diff options
context:
space:
mode:
authorBea Lam <bea.lam@nokia.com>2009-10-28 00:37:25 (GMT)
committerBea Lam <bea.lam@nokia.com>2009-10-28 00:37:25 (GMT)
commit0f0a5081c671297d550fd51ccc66bb5fb8a68b86 (patch)
tree606a62e5d583270d5f87d7003b295c47ffa71e22 /src/declarative/debugger/qmldebug.cpp
parent719cf647346f8e81899c45914200fdea2b1b4e2b (diff)
downloadQt-0f0a5081c671297d550fd51ccc66bb5fb8a68b86.zip
Qt-0f0a5081c671297d550fd51ccc66bb5fb8a68b86.tar.gz
Qt-0f0a5081c671297d550fd51ccc66bb5fb8a68b86.tar.bz2
Check values when remove() is called
Diffstat (limited to 'src/declarative/debugger/qmldebug.cpp')
-rw-r--r--src/declarative/debugger/qmldebug.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/declarative/debugger/qmldebug.cpp b/src/declarative/debugger/qmldebug.cpp
index 2537ec0..6e541a9 100644
--- a/src/declarative/debugger/qmldebug.cpp
+++ b/src/declarative/debugger/qmldebug.cpp
@@ -67,26 +67,30 @@ int QmlEngineDebugPrivate::getId()
void QmlEngineDebugPrivate::remove(QmlEngineDebug *c, QmlDebugEnginesQuery *q)
{
QmlEngineDebugPrivate *p = (QmlEngineDebugPrivate *)QObjectPrivate::get(c);
- p->enginesQuery.remove(q->m_queryId);
+ if (p && q)
+ p->enginesQuery.remove(q->m_queryId);
}
void QmlEngineDebugPrivate::remove(QmlEngineDebug *c,
QmlDebugRootContextQuery *q)
{
QmlEngineDebugPrivate *p = (QmlEngineDebugPrivate *)QObjectPrivate::get(c);
- p->rootContextQuery.remove(q->m_queryId);
+ if (p && q)
+ p->rootContextQuery.remove(q->m_queryId);
}
void QmlEngineDebugPrivate::remove(QmlEngineDebug *c, QmlDebugObjectQuery *q)
{
QmlEngineDebugPrivate *p = (QmlEngineDebugPrivate *)QObjectPrivate::get(c);
- p->objectQuery.remove(q->m_queryId);
+ if (p && q)
+ p->objectQuery.remove(q->m_queryId);
}
void QmlEngineDebugPrivate::remove(QmlEngineDebug *c, QmlDebugExpressionQuery *q)
{
QmlEngineDebugPrivate *p = (QmlEngineDebugPrivate *)QObjectPrivate::get(c);
- p->expressionQuery.remove(q->m_queryId);
+ if (p && q)
+ p->expressionQuery.remove(q->m_queryId);
}
Q_DECLARE_METATYPE(QmlDebugObjectReference);