diff options
author | John Ankarström <john@ankarstrom.se> | 2022-04-01 12:10:15 +0200 |
---|---|---|
committer | John Ankarström <john@ankarstrom.se> | 2022-04-01 12:14:24 +0200 |
commit | 75ec2e035ca3114a13023ba974d2a7dfb7f12451 (patch) | |
tree | ae43399ac8b28022fc0a4366e03617a8fcba571c | |
parent | 3d907443ef27355ec9ced8a244fd678df1ea2538 (diff) | |
download | EpisodeBrowser-75ec2e035ca3114a13023ba974d2a7dfb7f12451.tar.gz |
Fix control flow in UpdateTheme.
Fixes 4f98051cbe62171775f6b319400b6dc6c2841e07.
-rw-r--r-- | c/main.c | 11 |
1 files changed, 6 insertions, 5 deletions
@@ -314,16 +314,17 @@ UpdateTheme() static int bThemes = -1; switch (bThemes) { + case 0: + return; case -1: { HMODULE hModule; hModule = LoadLibrary(TEXT("uxtheme.dll")); bThemes = hModule && GetProcAddress(hModule,"SetWindowTheme"); - break; } - case 1: - bThemeActive = IsThemeActive(); - LvSetTheme(HElv, bThemeActive); - LvSetTheme(HDlv, bThemeActive); } + + bThemeActive = IsThemeActive(); + LvSetTheme(HElv, bThemeActive); + LvSetTheme(HDlv, bThemeActive); } |