3.6 None and null pointers

A null pointer argument is interpreted by Qt as a place holder for a pointer pointing to nothing and the design of SIP reflects this: you can pass None in many places where you can pass a (pointer to a) QObject. PyQt converts None to a null pointer before passing it on to Qt.

The design of Open Inventor is different: a null pointer argument provokes almost always a crash or program termination because of an assertion violation. Open Inventor accepts only null pointer arguments when the interface specifies explicitly a null pointer.

IVuPy raises a Python exception to prevent program termination when you pass None by accident.

However, there are a few exceptions where passing None is fine (read the underlying C++ code or the Coin3D documentation). This concerns

Let me know if you find other C++ member functions in the Open Inventor API which handle a null pointer gracefully.