]> gerrit.simantics Code Review - simantics/sysdyn.git/commitdiff
Only perform TrendView UI update if there's still a database session available.
authorlehtonen <lehtonen@ac1ea38d-2e2b-0410-8846-a27921b304fc>
Wed, 17 Mar 2010 11:37:17 +0000 (11:37 +0000)
committerlehtonen <lehtonen@ac1ea38d-2e2b-0410-8846-a27921b304fc>
Wed, 17 Mar 2010 11:37:17 +0000 (11:37 +0000)
git-svn-id: https://www.simantics.org/svn/simantics/sysdyn/trunk@15057 ac1ea38d-2e2b-0410-8846-a27921b304fc

org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/trend/TrendView.java

index 94c577ab46178f5e30dee3dc351a3b62aa0cdbaf..4981a0b2d11507df9f643618fabde81c4b7da3c6 100644 (file)
@@ -158,7 +158,11 @@ public class TrendView extends ViewPart {
     }\r
     \r
     public void updateView() {\r
-        SimanticsUI.getSession().asyncRequest(new ReadRequest() {            \r
+        Session session = SimanticsUI.peekSession();\r
+        if (session == null)\r
+            return;\r
+\r
+        session.asyncRequest(new ReadRequest() {\r
             @Override\r
             public void run(ReadGraph g) throws DatabaseException {\r
                 \r