diff --git a/newctrl/common_windows.c b/newctrl/common_windows.c index b30b132..d4db842 100644 --- a/newctrl/common_windows.c +++ b/newctrl/common_windows.c @@ -105,14 +105,9 @@ void paintControlBackground(HWND hwnd, HDC dc) parent = hwnd; for (;;) { parent = GetParent(parent); - if (parent == NULL) - xpanic("error getting parent container of control in paintControlBackground()", GetLastError()); - // wine sends these messages early, yay... - if (parent == msgwin) - return; - parent = GetParent(parent); if (parent == NULL) xpanic("error getting parent control of control in paintControlBackground()", GetLastError()); + // wine sends these messages early, yay... if (parent == msgwin) return; if (GetClassNameW(parent, classname, 128) == 0)