]> git.cworth.org Git - vogl/blobdiff - src/vogleditor/vogleditor_qstatetreemodel.cpp
UI: Fix support for taking snapshots after an edited & outdated snapshot.
[vogl] / src / vogleditor / vogleditor_qstatetreemodel.cpp
index 610bd1b6bdaf1638cef17b17a70f43d5cb33e348..7a0b1fc9f88d9dc30e9144cad62e67164188087c 100644 (file)
@@ -167,7 +167,7 @@ void vogleditor_QStateTreeModel::setupModelData(vogleditor_gl_state_snapshot* pS
 
         const vogl_context_desc& desc = pContext->get_context_desc();
         vogleditor_stateTreeContextItem* pContextItem = new vogleditor_stateTreeContextItem(tmp.sprintf("Context %p", (void*)desc.get_trace_context()), "", parent, *pContext);
-        if (m_pBaseSnapshot != NULL && m_pBaseSnapshot->get_contexts().size() > 0 && m_pBaseSnapshot->get_contexts().at(c) != NULL)
+        if (m_pBaseSnapshot != NULL && m_pBaseSnapshot->is_valid() && m_pBaseSnapshot->get_contexts().size() > 0 && m_pBaseSnapshot->get_contexts().at(c) != NULL)
         {
             // set the diff state to be the same state, so that there does not appear to be any diff's
             const vogl_context_snapshot* pDiffContext = m_pBaseSnapshot->get_contexts()[c];