Commit 9cf9e5e7 authored by Alexandre Julliard's avatar Alexandre Julliard

Don't register classes is no theme is active to avoid trouble (based

on a patch by Vitaliy Margolen).
parent 6fc9f190
......@@ -26,6 +26,7 @@
#include "wingdi.h"
#include "winuser.h"
#include "comctl32.h"
#include "uxtheme.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(theming);
......@@ -113,6 +114,8 @@ void THEMING_Initialize (void)
static const WCHAR refDataPropName[] =
{ 'C','C','3','2','T','h','e','m','i','n','g','D','a','t','a',0 };
if (!IsThemeActive()) return;
atSubclassProp = GlobalAddAtomW (subclassPropName);
atRefDataProp = GlobalAddAtomW (refDataPropName);
......@@ -154,6 +157,9 @@ void THEMING_Initialize (void)
void THEMING_Uninitialize (void)
{
int i;
if (!atSubclassProp) return; /* not initialized */
for (i = 0; i < NUM_SUBCLASSES; i++)
{
UnregisterClassW (subclasses[i].className, NULL);
......
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