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:
parent
759c0461e1
commit
ed88275a88
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user