summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--roi.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/roi.c b/roi.c
index 9192472..eac03d9 100644
--- a/roi.c
+++ b/roi.c
@@ -237,7 +237,11 @@ main(int argc, char *argv[])
gtk_init(&argc, &argv);
+ if (argc < 2)
+ exit(EXIT_FAILURE);
roi.input = gdk_pixbuf_new_from_file(argv[1], NULL);
+ if (!roi.input)
+ exit(EXIT_FAILURE);
roi.window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
roi.drawing_area = gtk_drawing_area_new();