bastienleonard / pysfml-cython

A Python 2/3 binding for SFML 2, written with Cython
http://pysfml2-cython.readthedocs.org/
Other
68 stars 8 forks source link

Segfault on Time equality check with non-Time object #47

Closed ghost closed 12 years ago

ghost commented 12 years ago

Running on 64-bit Linux. I had a Time object (call it time) and attempted to execute this statement:

time == None

which caused a segmentation fault.

bastienleonard commented 12 years ago

Thanks. This should be fixed with commit d6607840feb2ad6f84c9c8173afe6b8ec4aeea0e.

The segmentation fault doesn't happen in other classes, because they only contain pure Python, so an exception is raised instead. But thinking about it, I guess I should make it so that comparison operators return False too.