don't crash with a NULL pointer exception, if "do not decode as" is used

svn path=/trunk/; revision=15787
This commit is contained in:
Ulf Lamping 2005-09-13 18:42:12 +00:00
parent 7cc57ec40c
commit f2712da215
1 changed files with 5 additions and 5 deletions

View File

@ -275,13 +275,13 @@ decode_change_one_dcerpc_binding(const gchar *table_name, decode_dcerpc_bind_val
}
#endif
if (abbrev != NULL && strcmp(abbrev, "(default)") == 0) {
if (key == NULL || (abbrev != NULL && strcmp(abbrev, "(default)") == 0) ) {
decode_dcerpc_binding_reset(table_name, binding);
} else {
binding->ifname = g_string_new(abbrev);
binding->uuid = key->uuid;
binding->ver = key->ver;
decode_dcerpc_binding_change(table_name, binding);
binding->ifname = g_string_new(abbrev);
binding->uuid = key->uuid;
binding->ver = key->ver;
decode_dcerpc_binding_change(table_name, binding);
}
#if GTK_MAJOR_VERSION >= 2
if (abbrev != NULL)