char *key;
/*
- * Make sure the dissector table exists.
+ * Make sure the handle and the dissector table exist.
*/
+ if (handle == NULL) {
+ fprintf(stderr, "OOPS: handle to register \"%s\" to doesn't exist\n",
+ name);
+ if (getenv("WIRESHARK_ABORT_ON_DISSECTOR_BUG") != NULL)
+ abort();
+ return;
+ }
if (sub_dissectors == NULL) {
fprintf(stderr, "OOPS: dissector table \"%s\" doesn't exist\n",
name);
return;
}
- /* sanity checks */
- g_assert(handle!=NULL);
switch (sub_dissectors->type) {
case FT_STRING:
sub_dissectors = find_dissector_table(name);
/*
- * Make sure the dissector table exists.
+ * Make sure the handle and the dissector table exist.
*/
+ if (handle == NULL) {
+ fprintf(stderr, "OOPS: handle to register \"%s\" to doesn't exist\n",
+ name);
+ if (getenv("WIRESHARK_ABORT_ON_DISSECTOR_BUG") != NULL)
+ abort();
+ return;
+ }
if (sub_dissectors == NULL) {
fprintf(stderr, "OOPS: dissector table \"%s\" doesn't exist\n",
name);
return;
}
- /* sanity checks */
- g_assert(handle!=NULL);
- if (sub_dissectors->type != FT_GUID) {
+ if (sub_dissectors->type != FT_GUID) {
g_assert_not_reached();
}