Fix wxWindow::IsDescendant() to work with argument equal to this window.
authorVadim Zeitlin <vadim@wxwidgets.org>
Fri, 8 Jun 2012 18:44:18 +0000 (18:44 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Fri, 8 Jun 2012 18:44:18 +0000 (18:44 +0000)
commitfd20ceff24ca5f002d6424856e9d19f6d9178fb5
tree9195443134983e38c89a39e6c80c3565f0add44d
parent9bd5c5fcda3fe2222bf37f1615961516d6b40e7f
Fix wxWindow::IsDescendant() to work with argument equal to this window.

Passing the window itself as IsDescendant() argument for a top level window
resulted in a NULL pointer dereference. Fix this and also simplify the
function code by not using the parent window before checking it's !NULL.

Closes #14387.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71702 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
src/common/wincmn.cpp