Quit when failing to create dialog.

This commit is contained in:
Dave Davenport 2016-03-03 08:11:48 +01:00
parent 93b80be913
commit 3d2f0a07db
1 changed files with 5 additions and 1 deletions

View File

@ -179,7 +179,11 @@ static void __run_switcher_internal ( ModeMode mode, char *input )
char *prompt = g_strdup_printf ( "%s:", mode_get_name ( modi[mode] ) );
curr_switcher = mode;
RofiViewState * state = rofi_view_create ( modi[mode], input, prompt, NULL, MENU_NORMAL, process_result );
rofi_view_set_active ( state );
if ( state ) {
rofi_view_set_active ( state );
} else {
g_main_loop_quit( main_loop );
}
g_free ( prompt );
}
static void run_switcher ( ModeMode mode )