diff options
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/dex/class.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/plugins/dex/class.c b/plugins/dex/class.c index 9defac7..dafa984 100644 --- a/plugins/dex/class.c +++ b/plugins/dex/class.c @@ -636,9 +636,19 @@ GDexMethod *g_dex_class_get_method(const GDexClass *class, bool virtual, size_t GDexMethod *result; /* Instance à renvoyer */ if (virtual) - result = class->virtual_methods[index]; + { + if (index < class->vmethods_count) + result = class->virtual_methods[index]; + else + result = NULL; + } else - result = class->direct_methods[index]; + { + if (index < class->dmethods_count) + result = class->direct_methods[index]; + else + result = NULL; + } if (result != NULL) g_object_ref(G_OBJECT(result)); |