Allow NULL parent in message dialog.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26279 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robert Roebling
2004-03-20 12:28:12 +00:00
parent aa154cb157
commit 7aad0bf32e
2 changed files with 12 additions and 6 deletions

View File

@@ -39,9 +39,12 @@ wxMessageDialog::wxMessageDialog(wxWindow *parent,
m_caption = caption;
m_message = message;
m_dialogStyle = style;
while (!parent->IsTopLevel())
parent = parent->GetParent();
if (parent)
{
while (!parent->IsTopLevel())
parent = parent->GetParent();
}
m_parent = parent;
}