Ensure we don't crash in wxProgressDialog::DoGetPosition()

Check that we do have the shared data before dereferencing the pointer
to it. While this normally will always be the case, it could be null if
some error happened, so add a check for it, just as we already do it
elsewhere.
This commit is contained in:
Vadim Zeitlin 2017-10-28 22:59:58 +02:00
parent 759c0461e1
commit ed88275a88

View File

@ -746,6 +746,7 @@ void wxProgressDialog::DoGetPosition(int *x, int *y) const
if ( HasNativeTaskDialog() )
{
wxPoint pos;
if ( m_sharedData )
{
wxCriticalSectionLocker locker(m_sharedData->m_cs);
pos = m_sharedData->m_winPosition;