Avoid crashes in wxGenericListCtrl client<->screen conversion code.
authorVadim Zeitlin <vadim@wxwidgets.org>
Sat, 16 Oct 2010 18:11:32 +0000 (18:11 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sat, 16 Oct 2010 18:11:32 +0000 (18:11 +0000)
commita9544d0014003a3a1ea759b2a2d1c016b74959d6
tree5a548816427d68f5508972c9e575ac42620dffdb
parent9e19da0f2ad5fe82c24ae82c281786b64d0156d5
Avoid crashes in wxGenericListCtrl client<->screen conversion code.

At least in wxUniv build, DoScreenToClient() can be called before the main
control window is created which results in a crash when attempting to forward
to its DoScreenToClient() version.

Check for m_mainWin being non-NULL before using it to at least avoid the
crash, even if it's not really clear whether this is a 100% correct fix.

Closes #12390.

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