diff options
author | Benjamin Franzke <benjaminfranzke@googlemail.com> | 2012-03-31 16:35:26 +0200 |
---|---|---|
committer | Benjamin Franzke <benjaminfranzke@googlemail.com> | 2012-03-31 16:35:26 +0200 |
commit | 23462e769c604d3deebb85190f929bf2f7f719e2 (patch) | |
tree | bfec48915c8b5f847002d591a524be21f4e3b8e8 | |
parent | 9b65046df7f53e477f0b6ba3bf61a069178061d4 (diff) | |
download | cv-23462e769c604d3deebb85190f929bf2f7f719e2.tar.gz cv-23462e769c604d3deebb85190f929bf2f7f719e2.tar.bz2 cv-23462e769c604d3deebb85190f929bf2f7f719e2.zip |
roi: Fail if invalid or no image is given
-rw-r--r-- | roi.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -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(); |