Arguably, some sort of assert belongs there.
Passing a null pointer probably means there's really something else wrong at a higher level. If we could arrange that the DISSECTOR_ASSERT macros do something useful when *not* executed during a dissection, that would work. Change-Id: I2605d1e1f97d35370736852aaf29eeaf2c560279 Reviewed-on: https://code.wireshark.org/review/10592 Reviewed-by: Guy Harris <guy@alum.mit.edu>
This commit is contained in:
parent
1d6710f1dd
commit
741ee8cce5
|
@ -1484,6 +1484,7 @@ dissector_get_string_handle(dissector_table_t sub_dissectors,
|
|||
{
|
||||
dtbl_entry_t *dtbl_entry;
|
||||
|
||||
/* XXX ASSERT instead ? */
|
||||
if (!string) return NULL;
|
||||
dtbl_entry = find_string_dtbl_entry(sub_dissectors, string);
|
||||
if (dtbl_entry != NULL)
|
||||
|
@ -1497,6 +1498,7 @@ dissector_get_default_string_handle(const char *name, const gchar *string)
|
|||
{
|
||||
dissector_table_t sub_dissectors;
|
||||
|
||||
/* XXX ASSERT instead ? */
|
||||
if (!string) return NULL;
|
||||
sub_dissectors = find_dissector_table(name);
|
||||
if (sub_dissectors != NULL) {
|
||||
|
|
Loading…
Reference in New Issue