]> wirehaze git hosting - graph-theory.git/blobdiff - graph/adj.c

wirehaze git hosting

add gt.c
[graph-theory.git] / graph / adj.c
index dfcf0363dcf44da5290bf299dd2d20a1f0c3c9b7..fbad922f1a173dbc52eabbb7e1e91d54fe2f3aa9 100644 (file)
@@ -127,6 +127,9 @@ free_graph (struct graph *g)
   struct vertex *v;
   unsigned int i;
 
+  if (!g)
+    return;
+
   for (i = 0; i < g->nv; ++i)
     {
       v = &g->v[i];