Commits

Aleš Erjavec committed a5e7af5

Fixed Example_richcmp method when the other argument is not an TPyExample.

Comments (0)

Files changed (1)

source/orange/cls_example.cpp

 
 PyObject *Example_richcmp(TPyExample *one, TPyExample *another, int op)
 { PyTRY
+    if (!PyOrExample_Check(another)) {
+        Py_INCREF(Py_NotImplemented);
+        return Py_NotImplemented;
+    }
+
     PExample rone = PyExample_AS_Example(one);
     TExample &ranother = PyExample_AS_ExampleReference(another);
     if (rone->domain != ranother.domain) {