“Jochen Ditterich” <email@example.com> wrote in message
I am having a problem where a call to PtDamageWidget causes the
application to crash (under QNX 6.3). Calling PtWidgetIsRealized with the
same pointer immediately before calling PtDamageWidget returns 1. Any
ideas out there what could be going on???
Most likely your widget pointer doesn’t point to a widget – is it possible
that the widget you’re trying to damage has been destroyed?
PtWidgetIsRealized() doesn’t crash because is a simple macro that just reads
the flags from the widget. As long as there are at least a few bytes of
memory where the pointer points to, PtWidgetIsRealized() will return some
value. PtDamageWidget(), on the other hand, attempts to locate the widget’s
ancestors and update their damage lists, which gives it many opportunities
to to hit a bad pointer and crash if the original pointer doesn’t point to a