Prevent segfault if no theme is set.

This commit is contained in:
Vitaliy Margolen 2004-01-26 20:13:50 +00:00 committed by Alexandre Julliard
parent 347b7bbd51
commit a3b58e9d30
1 changed files with 2 additions and 1 deletions

View File

@ -215,7 +215,8 @@ HRESULT MSSTYLES_SetActiveTheme(PTHEME_FILE tf)
if(tfActiveTheme) if(tfActiveTheme)
MSSTYLES_CloseThemeFile(tfActiveTheme); MSSTYLES_CloseThemeFile(tfActiveTheme);
tfActiveTheme = tf; tfActiveTheme = tf;
tfActiveTheme->dwRefCount++; if (tfActiveTheme)
tfActiveTheme->dwRefCount++;
return S_OK; return S_OK;
} }