Changeset 22043


Ignore:
Timestamp:
Nov 1, 2012, 1:42:26 AM (8 years ago)
Author:
dmik
Message:

user32: Prevent debug assertion.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/user32/win32wbase.cpp

    r21988 r22043  
    874874        }
    875875    }
    876     SendMessageA(getWindowHandle(),WM_DESTROY, 0, 0);
     876
     877    // there may be no window proc already (reset to null with SetWindowLong by
     878    // the application), avoid the debug assertion
     879    if (win32wndproc)
     880        SendMessageA(getWindowHandle(),WM_DESTROY, 0, 0);
     881
    877882    if(::IsWindow(hwnd) == FALSE) {
    878883        //object already destroyed, so return immediately
    879884        return 1;
    880885    }
    881     SendMessageA(getWindowHandle(),WM_NCDESTROY, 0, 0);
     886
     887    if (win32wndproc)
     888        SendMessageA(getWindowHandle(),WM_NCDESTROY, 0, 0);
    882889
    883890    TIMER_KillTimerFromWindow(getWindowHandle());
Note: See TracChangeset for help on using the changeset viewer.