From: ellson Date: Mon, 30 Oct 2006 15:16:48 +0000 (+0000) Subject: fix b1040 - poor warning messages when shapefile is missing X-Git-Tag: LAST_LIBGRAPH~32^2~5820 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=bc1d934cbc9b0ca80fb572ff952d2c2bcd5f11c7;p=graphviz fix b1040 - poor warning messages when shapefile is missing --- diff --git a/lib/common/shapes.c b/lib/common/shapes.c index 3f9468df2..89abdd830 100644 --- a/lib/common/shapes.c +++ b/lib/common/shapes.c @@ -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 : ""), n->name); } else diff --git a/lib/gvc/gvusershape.c b/lib/gvc/gvusershape.c index 3955f8b16..016e2ae43 100644 --- a/lib/gvc/gvusershape.c +++ b/lib/gvc/gvusershape.c @@ -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);