From: Thadeu Lima de Souza Cascardo Date: Sat, 16 Aug 2008 22:55:04 +0000 (-0300) Subject: If dots file cannot be found, exit X-Git-Url: http://git.cascardo.eti.br/?p=cascardo%2Fmovie.git;a=commitdiff_plain;h=c0eeedafd8a836da699964397d28dbc7d56e04a1 If dots file cannot be found, exit --- diff --git a/movie.c b/movie.c index 08531fe..ec850ad 100644 --- 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;