Menu

#103 Missing NULL checks in CigiOutgoingMsg

open
CCL (28)
5
2012-03-03
2012-03-03
Anonymous
No

It's really frustrating trying to write script bindings for this API due to the brittle nature of some of the class relationships. It's possible to instantiate CigiOutgoingMsg outside of a session, but calling BeginMsg() will segfault due to the 'Session' member variable being uninitialized. In a perfect world, it would be impossible to instantiate a 'standalone' CigiOutgoingMsg if this isn't the design intention; however, given the current state of the CCL, I'd settle for a liberal sprinkling of assert(Session != NULL) to at least warn people where the sharp edges are...

Discussion