OSDN Git Service

Guard against possible NPE.
authorTor Norbye <tnorbye@google.com>
Mon, 31 Jan 2011 04:54:58 +0000 (20:54 -0800)
committerTor Norbye <tnorbye@google.com>
Mon, 31 Jan 2011 04:54:58 +0000 (20:54 -0800)
Change-Id: I4be9b1659aa1394bea0f24f34fb4681e781b96ae

eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/GraphicalEditorPart.java

index cb5c849..eda6514 100644 (file)
@@ -1519,7 +1519,7 @@ public class GraphicalEditorPart extends EditorPart
         canvas.setSession(session, explodeNodes);
 
         // update the UiElementNode with the layout info.
-        if (session.getResult().isSuccess() == false) {
+        if (session != null && session.getResult().isSuccess() == false) {
             // An error was generated. Print it (and any other accumulated warnings)
             String errorMessage = session.getResult().getErrorMessage();
             Throwable exception = session.getResult().getException();