diff options
Diffstat (limited to 'libcaja-private')
-rw-r--r-- | libcaja-private/caja-open-with-dialog.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/libcaja-private/caja-open-with-dialog.c b/libcaja-private/caja-open-with-dialog.c index 45996fdf..e42a8fbd 100644 --- a/libcaja-private/caja-open-with-dialog.c +++ b/libcaja-private/caja-open-with-dialog.c @@ -249,12 +249,15 @@ add_or_find_application (CajaOpenWithDialog *dialog) if (app == NULL) { - message = g_strdup_printf (_("Could not add application to the application database: %s"), error->message); + message = g_strdup_printf (_("Could not add application to the application database: %s"), error ? error->message : _("Unknown error")); eel_show_error_dialog (_("Could not add application"), message, GTK_WINDOW (dialog)); g_free (message); - g_error_free (error); + + if (error) + g_error_free (error); + return NULL; } |