diff --git a/dlls/comctl32/tests/toolbar.c b/dlls/comctl32/tests/toolbar.c
index 474e5efa088287cf17e29805cae7601c09176901..244497537d9b431c4e69659fe7074a1b459f94b6 100644
--- a/dlls/comctl32/tests/toolbar.c
+++ b/dlls/comctl32/tests/toolbar.c
@@ -1881,7 +1881,7 @@ static void test_TB_GET_SET_EXTENDEDSTYLE(void)
 {
     DWORD style, oldstyle, oldstyle2;
     const extended_style_t *ptr;
-    HWND hwnd;
+    HWND hwnd = NULL;
     int i;
 
     rebuild_toolbar(&hwnd);