OSDN Git Service

MSW: closing console->molecule was causing crash. Hopefully fixed.
[molby/Molby.git] / MolLib / MainView.c
index 7ced70e..55deda8 100755 (executable)
@@ -220,7 +220,8 @@ MainView_setViewObject(MainView *mview, void *ref)
                mview->ref = ref;  /*  No retain  */
                IntGroupClear(mview->tableCache);
                IntGroupClear(mview->tableSelection);
-               MoleculeCallback_notifyModification(mview->mol, 0);
+        if (mview->ref != NULL)
+            MoleculeCallback_notifyModification(mview->mol, 0);
        }
 }