diff options
Diffstat (limited to 'plugins/pychrysalide')
-rw-r--r-- | plugins/pychrysalide/analysis/binary.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/plugins/pychrysalide/analysis/binary.c b/plugins/pychrysalide/analysis/binary.c index c173605..f73684b 100644 --- a/plugins/pychrysalide/analysis/binary.c +++ b/plugins/pychrysalide/analysis/binary.c @@ -218,9 +218,16 @@ static PyObject *py_loaded_binary_get_disassembled_cache(PyObject *self, void *c binary = G_LOADED_BINARY(pygobject_get(self)); cache = g_loaded_binary_get_disassembled_cache(binary); - result = pygobject_new(G_OBJECT(cache)); - - g_object_unref(G_OBJECT(cache)); + if (cache != NULL) + { + result = pygobject_new(G_OBJECT(cache)); + g_object_unref(G_OBJECT(cache)); + } + else + { + result = Py_None; + Py_INCREF(result); + } return result; |