aboutsummaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'main.c')
-rw-r--r--main.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/main.c b/main.c
index f458ca5..b5eb616 100644
--- a/main.c
+++ b/main.c
@@ -27,11 +27,15 @@ static void open(GApplication *app, GFile **files, gint n_files,
char *curr_filename = g_file_get_path(files[0]);
int i = scan(curr_filename);
if (i < 0) {
- printf("failed to load file");
+ printf("failed to load file\n");
return;
}
- load_image(curr_filename);
+ i = load_image(curr_filename);
+ if (i < 0) {
+ printf("failed to load file\n");
+ quit();
+ }
}
int main(int argc, char *argv[])