Hi all,
my question tells for your very wide experience:
what are all the motivations for which a QMdiArea::removeSubWindow(QWidget* widget) should fail, raising an exception (and, so, crashing the program)?

Details:
MDI application.
QDialog as widget in a QMdiSubWindow.
When closing it, following rows are executed:
Qt Code:
  1. mdiArea->removeSubWindow(wArticle);
  2. delete pArticle;
  3. pArticle=NULL;
  4. wArticle=NULL;
To copy to clipboard, switch view to plain text mode 
where:
mdiArea => QMdiArea*
wArticle => QMdiSubWindow*
pArticle => QDialog* (contained by wArticle)
The first of the four instructions raises an exception and makes crash the program.
So, what I'm asking is: what has wArticle to have of strange (since I checked it is not NULL) to make the method fail?