]> granicus.if.org Git - graphviz/commitdiff
fix b1040 - poor warning messages when shapefile is missing
authorellson <devnull@localhost>
Mon, 30 Oct 2006 15:16:48 +0000 (15:16 +0000)
committerellson <devnull@localhost>
Mon, 30 Oct 2006 15:16:48 +0000 (15:16 +0000)
lib/common/shapes.c
lib/gvc/gvusershape.c

index 3f9468df22aa3ed1dac8a25dd11a24c64ab3a8ba..89abdd8306a793751ef9a989577e70a533514499 100644 (file)
@@ -556,7 +556,7 @@ static void poly_init(node_t * n)
                char *sfile = agget(n, "shapefile");
                imagesize = gvusershape_size(n->graph, sfile);
                if ((imagesize.x == -1) && (imagesize.y == -1)) {
-                   agerr(AGERR,
+                   agerr(AGWARN,
                      "No or improper shapefile=\"%s\" for node \"%s\"\n",
                      (sfile ? sfile : "<nil>"), n->name);
                } else
index 3955f8b161b9956628df0dd3114f2f90566c8090..016e2ae4305e46683de69d09562bc57a366d3877 100644 (file)
@@ -299,6 +299,8 @@ static usershape_t *gvusershape_open (char *name)
            case FT_NULL:
                if (!(us->data = (void*)find_user_shape(us->name)))
                    agerr(AGWARN, "\"%s\" was not found as a file or as a shape library member\n", us->name);
+                   free(us);
+                   return NULL;
                break;
            case FT_GIF:
                gif_size(us);