Hello, Here is my patch for bug #150.
diff --git a/src/gpicview.c b/src/gpicview.c index 00d6a47..5e8671e 100644 --- a/src/gpicview.c +++ b/src/gpicview.c @@ -90,6 +90,13 @@ int main(int argc, char *argv[]) if( G_UNLIKELY( *files[0] != '/' && strstr( files[0], "://" )) ) // This is an URI { char* path = g_filename_from_uri( files[0], NULL, NULL ); + + if(!path) + { + main_win_show_error(win, _("Cannot open file")); + return 1; + } + main_win_open( win, path, ZOOM_NONE ); g_free( path ); } diff --git a/src/main-win.c b/src/main-win.c index 32f6433..2d3c515 100644 --- a/src/main-win.c +++ b/src/main-win.c @@ -372,6 +372,9 @@ static void update_btns(MainWin* mw) gboolean main_win_open( MainWin* mw, const char* file_path, ZoomMode zoom ) { + if(!file_path) + return FALSE; + if (g_file_test(file_path, G_FILE_TEST_IS_DIR)) { image_list_open_dir( mw->img_list, file_path, NULL ); Best regards, Vladyslav Stovmanenko
_______________________________________________ Lxde-list mailing list Lxde-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/lxde-list