diff options
Diffstat (limited to 'src/main.c')
-rw-r--r-- | src/main.c | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -80,7 +80,13 @@ static gint main_method_window_response(GtkWidget *method_window, gint response, ctx->finecentering = FALSE; } - ctx->cache_filename = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(ctx->cache_file_selector)); + if ( ctx->psmode == PEAKSEARCH_CACHED ) { + ctx->cache_filename = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(ctx->cache_file_selector)); + if ( !ctx->cache_filename ) { + fprintf(stderr, "Please specify a cache filename!\n"); + gtk_exit(1); + } + } gtk_widget_destroy(method_window); while ( gtk_events_pending() ) gtk_main_iteration(); |