aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--c/main.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/c/main.c b/c/main.c
index 3906383..2adb2f2 100644
--- a/c/main.c
+++ b/c/main.c
@@ -336,7 +336,7 @@ UpdateTheme()
HMODULE hModule;
hModule = LoadLibrary(TEXT("uxtheme.dll"));
bThemes = hModule && GetProcAddress(hModule,"SetWindowTheme");
- FreeLibrary(hModule);
+ if (hModule) FreeLibrary(hModule);
}
if (!bThemes) return;
@@ -359,5 +359,6 @@ UpdateTheme()
ListView_SetExtendedListViewStyleEx(HDlv, LVS_EX_DOUBLEBUFFER, dwStyle);
/* Hide focus rectangles. */
- SendMessage(HWnd, WM_UPDATEUISTATE, MAKEWPARAM(wAction, UISF_HIDEFOCUS), 0);
+ SendMessage(HElv, WM_UPDATEUISTATE, MAKEWPARAM(wAction, UISF_HIDEFOCUS), 0);
+ SendMessage(HDlv, WM_UPDATEUISTATE, MAKEWPARAM(wAction, UISF_HIDEFOCUS), 0);
}