If picture does no exist, warn and exit
[cascardo/movie.git] / movie.c
diff --git a/movie.c b/movie.c
index 08531fe..ec850ad 100644 (file)
--- a/movie.c
+++ b/movie.c
@@ -79,6 +79,11 @@ ReadPoints (char *filename)
   Point last;
   Point rect;
   file = fopen (filename, "r");
+  if (file == NULL)
+    {
+      fprintf (stderr, "Could not open file %s\n", filename);
+      exit (1);
+    }
   points = g_array_new (FALSE, TRUE, sizeof (Point));
   buffer = NULL;
   len = 0;