From 7722e6d67a8e6e6a1cb73115ee3abe4380e29e2a Mon Sep 17 00:00:00 2001 From: nirav Date: Fri, 7 Sep 2018 21:56:19 +0530 Subject: Added more key bindings, fixed file loading error --- main.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'main.c') 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[]) -- cgit v1.2.3