]> granicus.if.org Git - graphviz/commitdiff
Initialize value to remove warning; only shift graph label if set.
authorEmden R. Gansner <erg@alum.mit.edu>
Wed, 7 May 2014 15:31:28 +0000 (11:31 -0400)
committerEmden R. Gansner <erg@alum.mit.edu>
Wed, 7 May 2014 15:31:28 +0000 (11:31 -0400)
lib/pack/pack.c

index 3a71ff08b93c009fe557dac89ac30b33e499f145..229857b459df6897b5811dfc1da36e2bfe8d9e4e 100644 (file)
@@ -919,7 +919,7 @@ point *putGraphs(int ng, Agraph_t ** gs, Agraph_t * root,
     int i, v;
     boxf* bbs;
     Agraph_t* g;
-    point* pts;
+    point* pts = 0;
     char* s;
 
     if (ng <= 0) return NULL;
@@ -1052,7 +1052,7 @@ static void shiftGraph(Agraph_t * g, int dx, int dy)
     bb.UR.y += dy;
     GD_bb(g) = bb;
 
-    if (GD_label(g))
+    if (GD_label(g) && GD_label(g)->set)
        MOVEPT(GD_label(g)->pos);
 
     for (i = 1; i <= GD_n_cluster(g); i++) {