]> source.dussan.org Git - vaadin-framework.git/commitdiff
Don't throw NPE if there is no implementation (#9081) 7.0.0.alpha3
authorArtur Signell <artur@vaadin.com>
Fri, 29 Jun 2012 17:41:13 +0000 (20:41 +0300)
committerArtur Signell <artur@vaadin.com>
Fri, 29 Jun 2012 17:41:13 +0000 (20:41 +0300)
src/com/vaadin/terminal/gwt/client/VConsole.java

index dee8529a842eb6e57847a9b76fc7408e4916b872..a221b42d6706fe20987f021ec009f0ee0fff00e3 100644 (file)
@@ -57,35 +57,49 @@ public class VConsole {
     }
 
     public static void log(String msg) {
-        impl.log(msg);
+        if (impl != null) {
+            impl.log(msg);
+        }
     }
 
     public static void log(Throwable e) {
-        impl.log(e);
+        if (impl != null) {
+            impl.log(e);
+        }
     }
 
     public static void error(Throwable e) {
-        impl.error(e);
+        if (impl != null) {
+            impl.error(e);
+        }
     }
 
     public static void error(String msg) {
-        impl.error(msg);
+        if (impl != null) {
+            impl.error(msg);
+        }
     }
 
     public static void printObject(Object msg) {
-        impl.printObject(msg);
+        if (impl != null) {
+            impl.printObject(msg);
+        }
     }
 
     public static void dirUIDL(ValueMap u, ApplicationConfiguration cnf) {
-        impl.dirUIDL(u, cnf);
+        if (impl != null) {
+            impl.dirUIDL(u, cnf);
+        }
     }
 
     public static void printLayoutProblems(ValueMap meta,
             ApplicationConnection applicationConnection,
             Set<ComponentConnector> zeroHeightComponents,
             Set<ComponentConnector> zeroWidthComponents) {
-        impl.printLayoutProblems(meta, applicationConnection,
-                zeroHeightComponents, zeroWidthComponents);
+        if (impl != null) {
+            impl.printLayoutProblems(meta, applicationConnection,
+                    zeroHeightComponents, zeroWidthComponents);
+        }
     }
 
 }