Skip to content

Commit

Permalink
bugfix: Handle null value from callback result if file chooser is can…
Browse files Browse the repository at this point in the history
…celed.
  • Loading branch information
jkotra committed Oct 22, 2023
1 parent cd4e501 commit 8a6abc8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion meson.build
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
project('com.github.jkotra.unlockr' , 'c',
version: '0.9.0',
version: '0.9.1',
meson_version: '>= 0.58.0',
default_options: [ 'warning_level=2',
'c_std=gnu11',
Expand Down
5 changes: 4 additions & 1 deletion src/process.c
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,10 @@ on_output_folder_chosen (GtkFileDialog *dialog,
char *password)
{
GFile *folder = gtk_file_dialog_select_folder_finish (dialog, res, NULL);

if (folder == NULL)
{
return;
}
// write output to selected folder.
char *path = g_file_get_path (folder);
gchar *output_path = g_build_filename (path, Pfile->name, NULL);
Expand Down

0 comments on commit 8a6abc8

Please sign in to comment.