alizadeh91 (22nd September 2012)
Another way to get to that kind of error (related to pointer being invalid) is by allocating child widgets on the stack and if the parent is deleted (or goes out of scope) first it calls delete with the child address (that is actually not allocated on heap so delete will cause the error).
Bookmarks