Commit 2f245af0 authored by Huw D M Davies's avatar Huw D M Davies Committed by Alexandre Julliard

Don't try to delete a wndclass background brush if it's a COLOR_*

constant.
parent a2bdadec
...@@ -240,7 +240,7 @@ static void CLASS_SetClassNameW( CLASS *classPtr, LPCWSTR name ) ...@@ -240,7 +240,7 @@ static void CLASS_SetClassNameW( CLASS *classPtr, LPCWSTR name )
static BOOL CLASS_FreeClass( CLASS *classPtr ) static BOOL CLASS_FreeClass( CLASS *classPtr )
{ {
CLASS **ppClass; CLASS **ppClass;
TRACE("%p \n", classPtr); TRACE("%p\n", classPtr);
/* Check if we can remove this class */ /* Check if we can remove this class */
...@@ -260,7 +260,8 @@ static BOOL CLASS_FreeClass( CLASS *classPtr ) ...@@ -260,7 +260,8 @@ static BOOL CLASS_FreeClass( CLASS *classPtr )
/* Delete the class */ /* Delete the class */
if (classPtr->dce) DCE_FreeDCE( classPtr->dce ); if (classPtr->dce) DCE_FreeDCE( classPtr->dce );
if (classPtr->hbrBackground) DeleteObject( classPtr->hbrBackground ); if (classPtr->hbrBackground > (HBRUSH)(COLOR_GRADIENTINACTIVECAPTION + 1))
DeleteObject( classPtr->hbrBackground );
GlobalDeleteAtom( classPtr->atomName ); GlobalDeleteAtom( classPtr->atomName );
CLASS_SetMenuNameA( classPtr, NULL ); CLASS_SetMenuNameA( classPtr, NULL );
CLASS_SetClassNameA( classPtr, NULL ); CLASS_SetClassNameA( classPtr, NULL );
...@@ -277,7 +278,7 @@ void CLASS_FreeModuleClasses( HMODULE16 hModule ) ...@@ -277,7 +278,7 @@ void CLASS_FreeModuleClasses( HMODULE16 hModule )
{ {
CLASS *ptr, *next; CLASS *ptr, *next;
TRACE("0x%08x \n", hModule); TRACE("0x%08x\n", hModule);
for (ptr = firstClass; ptr; ptr = next) for (ptr = firstClass; ptr; ptr = next)
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment