]> source.dussan.org Git - vaadin-framework.git/commitdiff
added null check to avoid some npe's
authorMatti Tahvonen <matti.tahvonen@itmill.com>
Thu, 8 Nov 2007 11:02:40 +0000 (11:02 +0000)
committerMatti Tahvonen <matti.tahvonen@itmill.com>
Thu, 8 Nov 2007 11:02:40 +0000 (11:02 +0000)
svn changeset:2757/svn branch:trunk

src/com/itmill/toolkit/terminal/gwt/server/JsonPaintTarget.java

index 03e0f0133e0c9873e2611e4c58dcdf6fedaff925..50e33c06c23b8a4743d8aa92c4a6f91e8584bea7 100644 (file)
@@ -389,8 +389,12 @@ public class JsonPaintTarget implements PaintTarget {
                                throw new PaintException(
                                                "Application not specified for resorce "
                                                                + value.getClass().getName());
-                       String uri = a.getURL().getPath();
-                       if (uri.charAt(uri.length() - 1) != '/')
+                       String uri;
+                       if(a.getURL() != null)
+                               uri = a.getURL().getPath();
+                       else
+                               uri = "";
+                       if (uri.length() > 0 && uri.charAt(uri.length() - 1) != '/')
                                uri += "/";
                        uri += a.getRelativeLocation(r);
                        addAttribute(name, uri);