summaryrefslogtreecommitdiff
path: root/plugins/pychrysa
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2015-10-16 20:00:00 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2015-10-16 20:00:00 (GMT)
commit5fcd4f54c5ca87ca9dfd9529d7b83bbec9aff64a (patch)
tree033981b0662791abf274ad33b4f33d47c3437382 /plugins/pychrysa
parenta30fc1056877860593c19498738775c0ac43794d (diff)
Prevented some mistakes pointed by Melkor.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@599 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
Diffstat (limited to 'plugins/pychrysa')
-rw-r--r--plugins/pychrysa/analysis/binary.c9
-rw-r--r--plugins/pychrysa/pychrysa.c2
2 files changed, 10 insertions, 1 deletions
diff --git a/plugins/pychrysa/analysis/binary.c b/plugins/pychrysa/analysis/binary.c
index 9e45e27..93b1c57 100644
--- a/plugins/pychrysa/analysis/binary.c
+++ b/plugins/pychrysa/analysis/binary.c
@@ -28,6 +28,9 @@
#include <pygobject.h>
+#include <i18n.h>
+
+
#include <analysis/binary.h>
@@ -82,7 +85,11 @@ static PyObject *py_loaded_binary_new(PyTypeObject *type, PyObject *args, PyObje
if (!ret) return NULL;
ret = PyObject_IsInstance(content_obj, (PyObject *)get_python_binary_content_type());
- if (!ret) return NULL;
+ if (ret == 0)
+ {
+ PyErr_SetString(PyExc_TypeError, _("Expected a BinContent as argument"));
+ return NULL;
+ }
content = G_BIN_CONTENT(pygobject_get(content_obj));
binary = g_loaded_binary_new(content);
diff --git a/plugins/pychrysa/pychrysa.c b/plugins/pychrysa/pychrysa.c
index c77553b..d241b92 100644
--- a/plugins/pychrysa/pychrysa.c
+++ b/plugins/pychrysa/pychrysa.c
@@ -526,6 +526,8 @@ PyMODINIT_FUNC PyInit_pychrysalide(void)
init_work_queue(NULL/* !! */);
#endif
+ init_work_queue(NULL/* !! */);
+
////////////////////////