From 855ca2ca2f30e72a8d82a4c2fb2750438fc15dd2 Mon Sep 17 00:00:00 2001 From: Tor Norbye Date: Sun, 30 Jan 2011 20:54:58 -0800 Subject: Guard against possible NPE. Change-Id: I4be9b1659aa1394bea0f24f34fb4681e781b96ae --- .../eclipse/adt/internal/editors/layout/gle2/GraphicalEditorPart.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/GraphicalEditorPart.java b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/GraphicalEditorPart.java index cb5c849..eda6514 100644 --- a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/GraphicalEditorPart.java +++ b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/GraphicalEditorPart.java @@ -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(); -- cgit v1.1