summaryrefslogtreecommitdiff
path: root/src/format/dex
diff options
context:
space:
mode:
Diffstat (limited to 'src/format/dex')
-rw-r--r--src/format/dex/class.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/format/dex/class.c b/src/format/dex/class.c
index eb2ba3f..bb2ae71 100644
--- a/src/format/dex/class.c
+++ b/src/format/dex/class.c
@@ -24,7 +24,6 @@
#include "class.h"
-#include <assert.h>
#include <malloc.h>
@@ -233,7 +232,7 @@ GDexClass *g_dex_class_new(GDexFormat *format, const class_def_item *def)
if (def->access_flags & ACC_ANNOTATION) goto gdcn_done;
ctype = get_type_from_dex_pool(format, def->class_idx);
- assert(ctype != NULL);
+ if (ctype == NULL) goto gdcn_unknown_type;
base = G_BIN_FORMAT(format);
@@ -299,6 +298,8 @@ GDexClass *g_dex_class_new(GDexFormat *format, const class_def_item *def)
g_object_unref(G_OBJECT(ctype));
+ gdcn_unknown_type:
+
gdcn_bad_item:
g_object_unref(G_OBJECT(result));