Fix possible leaks in stdext::format

This commit is contained in:
Eduardo Bart
2013-02-05 20:00:28 -02:00
parent dcd6249e8f
commit cf77df05ca
6 changed files with 9 additions and 8 deletions

View File

@@ -236,7 +236,7 @@ void WIN32Window::terminate()
}
if(m_instance) {
if(!UnregisterClassA(g_app.getCompactName().c_str(), m_instance))
if(!UnregisterClassA(g_app.getCompactName(), m_instance))
g_logger.error("UnregisterClassA failed");
m_instance = NULL;
}
@@ -262,7 +262,7 @@ void WIN32Window::internalCreateWindow()
wc.hCursor = m_defaultCursor;
wc.hbrBackground = (HBRUSH)GetStockObject(WHITE_BRUSH);
wc.lpszMenuName = NULL;
wc.lpszClassName = g_app.getCompactName().c_str();
wc.lpszClassName = g_app.getCompactName();
if(!RegisterClassA(&wc))
g_logger.fatal("Failed to register the window class.");