diff --git a/panels/keyboard/cc-keyboard-shortcut-dialog.c b/panels/keyboard/cc-keyboard-shortcut-dialog.c index 0d07b5f15..15f3dfd51 100644 --- a/panels/keyboard/cc-keyboard-shortcut-dialog.c +++ b/panels/keyboard/cc-keyboard-shortcut-dialog.c @@ -235,7 +235,7 @@ remove_item (CcKeyboardShortcutDialog *self, row_data = g_object_get_data (G_OBJECT (child), "data"); - if (row_data->item == item) + if (row_data && row_data->item == item) { if (strcmp (row_data->section_id, "custom") == 0) { @@ -411,6 +411,9 @@ reset_shortcut (CcKeyboardShortcutDialog *self, { ShortcutRowData *data; + if (row == GTK_WIDGET (self->custom_shortcut_add_row)) + return; + data = g_object_get_data (G_OBJECT (row), "data"); /* Don't reset custom shortcuts */