X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ee0a94cfc2f71e8b770eedda5197a1f4bd62b5cb..d96b9cafb8590da68df21aa81696ed33988f3a91:/src/aui/tabmdi.cpp diff --git a/src/aui/tabmdi.cpp b/src/aui/tabmdi.cpp index 71f53429d4..ddbdad83d6 100644 --- a/src/aui/tabmdi.cpp +++ b/src/aui/tabmdi.cpp @@ -400,16 +400,14 @@ bool wxTabMDIChildFrame::Destroy() wxTabMDIClientWindow* pClientWindow = pParentFrame->GetClientWindow(); wxASSERT_MSG(pClientWindow, wxT("Missing MDI Client Window")); - bool bActive = false; if (pParentFrame->GetActiveChild() == this) { pParentFrame->SetActiveChild(NULL); pParentFrame->SetChildMenuBar(NULL); - bActive = true; } - size_t pos, page_count = pClientWindow->GetPageCount(); - for (pos = 0; pos < page_count; pos++) + const size_t page_count = pClientWindow->GetPageCount(); + for (size_t pos = 0; pos < page_count; pos++) { if (pClientWindow->GetPage(pos) == this) return pClientWindow->DeletePage(pos);