summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorReuben Green <reubengreen73@gmail.com>2019-09-17 14:57:27 +0100
committerAndre Miranda <andreldm@xfce.org>2019-09-17 22:16:06 -0300
commit0cfd8d96fd4c1846b42927a71ada062cae25ac23 (patch)
tree55dd90b89c09d8b58d32ef73811ab9a51348e79c
parentc5e2345dac89612b7ef230fd1b9db53f26e620d3 (diff)
downloadthunar-0cfd8d96fd4c1846b42927a71ada062cae25ac23.tar.gz
Prevent Gtk-CRITICAL when adding or modifying a user customizable action.
Bug #15970 Adds a check for a NULL value which occurs when adding a new user customizable action or adding a keyboard shortcut to one which previously did not have one. This NULL value itself is not an error, since it indicates the abscence of an existing shortcut, but the lack of this check causes a Gtk-CRITICAL error.
-rw-r--r--plugins/thunar-uca/thunar-uca-editor.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/thunar-uca/thunar-uca-editor.c b/plugins/thunar-uca/thunar-uca-editor.c
index 58ac524e..9bc80754 100644
--- a/plugins/thunar-uca/thunar-uca-editor.c
+++ b/plugins/thunar-uca/thunar-uca-editor.c
@@ -655,7 +655,7 @@ thunar_uca_editor_save (ThunarUcaEditor *uca_editor,
-1);
/* always clear the accelerator, it'll be updated in thunar_uca_model_update */
- if (gtk_accel_map_lookup_entry (uca_editor->accel_path, &key) && key.accel_key != 0)
+ if (uca_editor->accel_path != NULL && gtk_accel_map_lookup_entry (uca_editor->accel_path, &key) && key.accel_key != 0)
gtk_accel_map_change_entry (uca_editor->accel_path, 0, 0, TRUE);
thunar_uca_model_update (uca_model, iter,