From a3b58e9d30036828b1b2b586b6d8bf4d5cde2f4b Mon Sep 17 00:00:00 2001 From: Vitaliy Margolen Date: Mon, 26 Jan 2004 20:13:50 +0000 Subject: [PATCH] Prevent segfault if no theme is set. --- dlls/uxtheme/msstyles.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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; } -- 2.11.4.GIT