My version of Python (2.5.2) core dumps if PySequence_Check is called with a
[obnox/wireshark/wip.git] / epan / wspython / wspy_register.c
index 76f4efd8f33897ea1c0f5ccb9055b18b5e738a20..91e71dfa73f7ed8b1418f48bbe319aff531e0d8e 100644 (file)
@@ -161,8 +161,8 @@ void register_all_py_protocols_func(register_cb cb _U_, gpointer client_data _U_
   py_dissectors = PyObject_CallObject(register_fn, py_args);
 
   /* Check that the py_dissectors is really a sequence */
-  if (!PySequence_Check(py_dissectors)) {
-    printf("not registered ...\n");
+  if (!py_dissectors || !PySequence_Check(py_dissectors)) {
+    printf("Python dissectors not registered ...\n");
     return;
   }