diff options
Diffstat (limited to 'plugins/pychrysalide/arch/processor.c')
-rw-r--r-- | plugins/pychrysalide/arch/processor.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/plugins/pychrysalide/arch/processor.c b/plugins/pychrysalide/arch/processor.c index 37f97a4..557e7a7 100644 --- a/plugins/pychrysalide/arch/processor.c +++ b/plugins/pychrysalide/arch/processor.c @@ -677,6 +677,8 @@ static GArchInstruction *py_arch_processor_disassemble_wrapper(const GArchProces PyObject *pyins; /* Instruction en objet Python */ int ret; /* Bilan d'une conversion */ + result = NULL; + gstate = PyGILState_Ensure(); pyobj = pygobject_new(G_OBJECT(proc)); @@ -696,10 +698,7 @@ static GArchInstruction *py_arch_processor_disassemble_wrapper(const GArchProces Py_DECREF(args); - if (pyins == NULL) - result = NULL; - - else + if (pyins != NULL) { ret = convert_to_arch_instruction(pyins, &result); @@ -721,9 +720,6 @@ static GArchInstruction *py_arch_processor_disassemble_wrapper(const GArchProces } - else - result = NULL; - PyGILState_Release(gstate); return result; |