aboutsummaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
authornirav <nirav@teisuu.com>2018-09-07 21:56:19 +0530
committerDandelion <nirav@teisuu.com>2018-09-07 21:56:19 +0530
commit7722e6d67a8e6e6a1cb73115ee3abe4380e29e2a (patch)
treec6ec058a30d102de7824b34842fbb7c90bdba2c2 /main.c
parent02f7a54e67260ee7995c6cd9bf40ae784b60203d (diff)
downloadim-7722e6d67a8e6e6a1cb73115ee3abe4380e29e2a.tar.gz
im-7722e6d67a8e6e6a1cb73115ee3abe4380e29e2a.zip
Added more key bindings, fixed file loading error
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[])