diff --git a/samples/mdi/mdi.cpp b/samples/mdi/mdi.cpp index e0195f0750..726bc8f18f 100644 --- a/samples/mdi/mdi.cpp +++ b/samples/mdi/mdi.cpp @@ -253,7 +253,7 @@ wxMenuBar *MyFrame::CreateMainMenubar() void MyFrame::OnClose(wxCloseEvent& event) { unsigned numChildren = MyChild::GetChildrenCount(); - if ( event.CanVeto() && (numChildren > 0) ) + if ( event.CanVeto() && (numChildren > 1) ) { wxString msg; msg.Printf("%d windows still open, close anyhow?", numChildren);