X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/6900a89752a9da56f653e388f2248e9e204a9f85..853149575e6cb46031b3ed06f3d0fa4c42440962:/src/generic/logg.cpp diff --git a/src/generic/logg.cpp b/src/generic/logg.cpp index e769bfb2bd..67fee0d39c 100644 --- a/src/generic/logg.cpp +++ b/src/generic/logg.cpp @@ -610,6 +610,11 @@ wxLogWindow::wxLogWindow(wxWindow *pParent, bool bShow, bool bDoPass) { + // Initialize it to NULL to ensure that we don't crash if any log messages + // are generated before the frame is fully created (while this doesn't + // happen normally, it might, in principle). + m_pLogFrame = NULL; + PassMessages(bDoPass); m_pLogFrame = new wxLogFrame(pParent, this, szTitle);