src/scripttools/debugging/qscriptdebuggerlocalswidget.cpp
changeset 30 5dc02b23752f
parent 18 2f34d5167611
--- a/src/scripttools/debugging/qscriptdebuggerlocalswidget.cpp	Wed Jun 23 19:07:03 2010 +0300
+++ b/src/scripttools/debugging/qscriptdebuggerlocalswidget.cpp	Tue Jul 06 15:10:48 2010 +0300
@@ -70,6 +70,8 @@
 
     bool hasChildren(const QModelIndex &parent) const
     {
+        if (!sourceModel())
+            return false;
         QModelIndex sourceParent = mapToSource(parent);
         if (parent.isValid() && !sourceParent.isValid())
             return false;
@@ -184,7 +186,8 @@
 
 void QScriptDebuggerLocalsWidgetPrivate::_q_expandIndex(const QModelIndex &index)
 {
-    view->expand(proxy->mapFromSource(index));
+    if (view->model() == index.model())
+        view->expand(proxy->mapFromSource(index));
 }
 
 class QScriptDebuggerLocalsItemDelegate