diff --git a/include/wx/msw/filedlg.h b/include/wx/msw/filedlg.h index 090c3e2418..7c97723dd7 100644 --- a/include/wx/msw/filedlg.h +++ b/include/wx/msw/filedlg.h @@ -79,7 +79,7 @@ private: // Extra data, possibly null if not needed, use MSWData() to access it if // it should be created on demand. - wxFileDialogMSWData* m_data; + wxFileDialogMSWData* m_data = nullptr; wxDECLARE_DYNAMIC_CLASS(wxFileDialog); diff --git a/src/msw/filedlg.cpp b/src/msw/filedlg.cpp index f685688a63..75a0b46012 100644 --- a/src/msw/filedlg.cpp +++ b/src/msw/filedlg.cpp @@ -1024,8 +1024,6 @@ wxFileDialog::wxFileDialog(wxWindow *parent, { // NB: all style checks are done by wxFileDialogBase::Create - m_data = nullptr; - // Must set to zero, otherwise the wx routines won't size the window // the second time you call the file dialog, because it thinks it is // already at the requested size.. (when centering)