summaryrefslogtreecommitdiffstats
path: root/gtk-gui.c
diff options
context:
space:
mode:
authorGravatar Amit Chaudhuri <amit.k.chaudhuri@gmail.com>2013-01-23 07:31:42 +0000
committerGravatar Dirk Hohndel <dirk@hohndel.org>2013-01-23 03:50:42 -0800
commitc149921df4d8ddd8d0df8b44cc7962bec980712d (patch)
treeac102adb19ed2614164d97f0a65b42c878cca557 /gtk-gui.c
parente618a245b97a0e1dce9524aae5efdd031cb94d83 (diff)
downloadsubsurface-c149921df4d8ddd8d0df8b44cc7962bec980712d.tar.gz
Fix crash when applying a non-edit of nicknames
As reported by Henrik, there was a crash lurking in edit_dc_nickname code. Invoking the dialog and selecting apply without changes exposed it neatly. This is a one line fix. Signed off by Amit Chaudhuri <amit.k.chaudhuri@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'gtk-gui.c')
-rw-r--r--gtk-gui.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gtk-gui.c b/gtk-gui.c
index 01615976c..e165012d5 100644
--- a/gtk-gui.c
+++ b/gtk-gui.c
@@ -1283,7 +1283,7 @@ static void edit_dc_nicknames(GtkWidget *w, gpointer data)
}
gtk_widget_destroy(confirm);
}
- if (res == GTK_RESPONSE_APPLY && holdnicknames->model != NULL ) {
+ if (res == GTK_RESPONSE_APPLY && holdnicknames && holdnicknames->model != NULL ) {
struct device_info * walk = holdnicknames;
struct device_info * release = holdnicknames;
struct device_info * track = holdnicknames->next;