Fix possible segfault
authorVitor Sessak <vitor1001@gmail.com>
Fri, 4 Apr 2008 20:04:58 +0000 (20:04 +0000)
committerVitor Sessak <vitor1001@gmail.com>
Fri, 4 Apr 2008 20:04:58 +0000 (20:04 +0000)
Commited in SoC by Bobby Bingham on 2007-07-14 23:16:15

Originally committed as revision 12689 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavfilter/avfiltergraph.c

index 5211c76..d4b6bf1 100644 (file)
@@ -112,7 +112,8 @@ int avfilter_graph_load_chain(AVFilterGraph *graph,
 
 fail:
     destroy_graph_filters(graph);
-    *first = *last = NULL;
+    if(first) *first = NULL;
+    if(last)  *last  = NULL;
     return -1;
 }