From c0eeedafd8a836da699964397d28dbc7d56e04a1 Mon Sep 17 00:00:00 2001 From: Thadeu Lima de Souza Cascardo Date: Sat, 16 Aug 2008 19:55:04 -0300 Subject: [PATCH] If dots file cannot be found, exit --- movie.c | 5 +++++ 1 file changed, 5 insertions(+) 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; -- 2.20.1