Corrected test for region validity in wxMSW wxRegion::DoOffset().
authorVadim Zeitlin <vadim@wxwidgets.org>
Fri, 16 Dec 2011 19:47:55 +0000 (19:47 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Fri, 16 Dec 2011 19:47:55 +0000 (19:47 +0000)
commit5b130f274edba5827fa68523def9e631824be5b8
treeab1878bd4eed35b80802edc17eced9663b2d8e1f
parent03dc350fa6de6edfe3ad9de2b951b1e7eee4f9a6
Corrected test for region validity in wxMSW wxRegion::DoOffset().

Checking M_REGION is not enough as the region can be invalid (meaning
m_refData dereferenced inside M_REGION is NULL itself) and not just not
initialized, so it resulted in crashes and not just the expected assert
failure when wxRegion::Offset() was called for an invalid region.

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