]> gerrit.simantics Code Review - simantics/platform.git/commitdiff
Sync git svn branch with SVN repository r33200.
authorTuukka Lehtonen <tuukka.lehtonen@semantum.fi>
Fri, 16 Sep 2016 09:58:41 +0000 (12:58 +0300)
committerTuukka Lehtonen <tuukka.lehtonen@semantum.fi>
Fri, 16 Sep 2016 09:58:41 +0000 (12:58 +0300)
refs #6493

bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/module/repository/ModuleRepository.java

index 5078d00802ba7fb257c37daa13cf49c43eb51e37..86b1ba7663d472b722bd313136e019f7e5475a6a 100644 (file)
@@ -177,11 +177,15 @@ public class ModuleRepository {
         }
 
         public void dispose() {
-            listeners.clear();
+            if (listeners != null)
+                listeners.clear();
             listeners = null;
             source = null;
             compilationResult = null;
-            runtimeModule.getResult().dispose();
+            if (runtimeModule != null) {
+                if (runtimeModule.didSucceed())
+                    runtimeModule.getResult().dispose();
+            }
             runtimeModule = null;
         }