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>
This commit is contained in:
Amit Chaudhuri 2013-01-23 07:31:42 +00:00 committed by Dirk Hohndel
parent e618a245b9
commit c149921df4

View file

@ -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;