diff --git a/dlls/uxtheme/msstyles.c b/dlls/uxtheme/msstyles.c index 4b150de76fa..d818eb94c32 100644 --- a/dlls/uxtheme/msstyles.c +++ b/dlls/uxtheme/msstyles.c @@ -215,7 +215,8 @@ HRESULT MSSTYLES_SetActiveTheme(PTHEME_FILE tf) if(tfActiveTheme) MSSTYLES_CloseThemeFile(tfActiveTheme); tfActiveTheme = tf; - tfActiveTheme->dwRefCount++; + if (tfActiveTheme) + tfActiveTheme->dwRefCount++; return S_OK; }