Graph: limit catched NPE 79/13379/1
Clément DAVID [Wed, 18 Dec 2013 14:33:01 +0000 (15:33 +0100)]
Change-Id: I9d31da34b0bddc2359e262647388a4edef568018

scilab/modules/graph/src/java/org/scilab/modules/graph/ScilabCanvas.java

index 6cc4430..72979f4 100644 (file)
@@ -329,6 +329,10 @@ public class ScilabCanvas extends mxInteractiveCanvas {
     public String getImageForStyle(Map<String, Object> style) {
         String filename = mxUtils.getString(style, mxConstants.STYLE_IMAGE);
 
+        if (filename == null) {
+            return null;
+        }
+
         try {
             return new URL(this.urlBasePath, filename).toExternalForm();
         } catch (MalformedURLException e) {