Fix stupid NPE from DiagramViewerLoadJob 85/4285/1
authorTuukka Lehtonen <tuukka.lehtonen@semantum.fi>
Mon, 8 Jun 2020 17:25:20 +0000 (20:25 +0300)
committerTuukka Lehtonen <tuukka.lehtonen@semantum.fi>
Mon, 8 Jun 2020 17:40:47 +0000 (17:40 +0000)
gitlab #550

Change-Id: I62acd0448f5ae8519d24f060ce0475e295b8a64a
(cherry picked from commit 291073d664e133feb7befd845f08f35502d92292)

bundles/org.simantics.modeling.ui/src/org/simantics/modeling/ui/diagramEditor/DiagramViewerLoadJob.java

index decf3356c68b1b72864f738ac1d6ac57b6fb1ea3..dc9d9d1bef72f88c590167b14acc666edf33d19b 100644 (file)
@@ -111,8 +111,8 @@ public class DiagramViewerLoadJob extends DatabaseJob {
                         });
                         END(task);
                     } catch (Throwable t) {
-                        viewer = null;
                         LOGGER.error("Failed to complete loading of diagram {} in the canvas thread", viewer.diagramResource, t);
+                        viewer = null;
                     }
                 }
             });