Explorar el Código

Check, if file exists to avoid debug output

benjamin.schwertfeger@gmail.com hace 13 años
padre
commit
84672977be

+ 4 - 2
plugins/org.yakindu.sct.ui.editor/src/org/yakindu/sct/ui/editor/editor/StatechartDiagramEditor.java

@@ -190,11 +190,13 @@ public class StatechartDiagramEditor extends DiagramDocumentEditor implements
 		try {
 			// Touch the file for revalidation, when the user did not save
 			// the changes
-			editorInput.getFile().touch(new NullProgressMonitor());
+			if (editorInput.getFile() != null && editorInput.getFile().exists()) {
+				editorInput.getFile().touch(new NullProgressMonitor());
+			}
 		} catch (CoreException e) {
 			e.printStackTrace();
 		}
 		super.dispose();
 	}
-	
+
 }