Win32: Properly clean up tools dialog after use (#1377)

When switching dialogs in editor mode, the (paint) tools dialog wouldn't
be properly cleared, instead only destroying the dialog window. Thus,
the next time it would be used, it'd try painting onto a device context
which did no longer correspond to any existing window, which made OpenGL
sad.
shapetextures
Nicolas Hake 2015-09-18 14:32:14 +02:00
parent 51eb389739
commit a11135e4ac
1 changed files with 2 additions and 1 deletions

View File

@ -821,7 +821,8 @@ void C4ConsoleGUI::ClearViewportMenu()
void C4ConsoleGUI::ToolsDlgClose()
{
::ClearDlg(Console.ToolsDlg.state->hDialog);
if (Console.ToolsDlg.state)
Console.ToolsDlg.state->Clear();
}
bool C4ConsoleGUI::PropertyDlgOpen()