diff --git a/Source/UI/Window/UIWindowMgr.h b/Source/UI/Window/UIWindowMgr.h index 5ca62b3c..30e59997 100644 --- a/Source/UI/Window/UIWindowMgr.h +++ b/Source/UI/Window/UIWindowMgr.h @@ -16,6 +16,7 @@ #include class UIWindow; +class UIMessageBox; class CBitmapRes; class CWebBrowser; struct MessengerMember; @@ -373,7 +374,7 @@ public: /* 09CC */ CWebBrowser* activeBrowser; /* 09D0 */ CWebBrowser* specialBrowser; /* 09D4 */ unsigned char unknown_09D4[0x10]; - /* 09E4 */ std::vector messageBoxes; + /* 09E4 */ std::vector messageBoxes; /* 09F0 */ unsigned char unknown_09F0[0x40]; /* 0A30 */ UIWindow* window_0A30; /* 0A34 */ WindowPolicyEntry policy[10041]; diff --git a/Source/UI/Window/WindowDialogs.cpp b/Source/UI/Window/WindowDialogs.cpp index de395907..3b64c4fc 100644 --- a/Source/UI/Window/WindowDialogs.cpp +++ b/Source/UI/Window/WindowDialogs.cpp @@ -248,9 +248,7 @@ int UIWindowMgr::Confirm( void UIWindowMgr::AddMessageBox( const char* text, int type, bool defaultAccept, int, int timeout, const char* caption, int width, int height, const char* icon, bool track ) { - std::vector& boxes = this->messageBoxes; - - if (boxes.size() > 5) { + if (this->messageBoxes.size() > 5) { MessageBoxA(hWnd, "Max MessageBox Count", "ERROR", 0); return; } @@ -260,7 +258,7 @@ void UIWindowMgr::AddMessageBox( this->rendered.push_back(box); if (track) { - boxes.push_back(box); + this->messageBoxes.push_back(box); } this->inputWindow = nullptr;