X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/937013e0fd914d4c42f9f5ec98da665986b93dfa..66f75561893ea7b4bf429d1882d9cc0407ba932d:/src/os2/spinbutt.cpp diff --git a/src/os2/spinbutt.cpp b/src/os2/spinbutt.cpp index a7b3237f25..533b209728 100644 --- a/src/os2/spinbutt.cpp +++ b/src/os2/spinbutt.cpp @@ -63,8 +63,11 @@ bool wxSpinButton::Create( m_windowId = NewControlId(); else m_windowId = vId; - m_backgroundColour = pParent->GetBackgroundColour(); - m_foregroundColour = pParent->GetForegroundColour(); + if (pParent) + { + m_backgroundColour = pParent->GetBackgroundColour(); + m_foregroundColour = pParent->GetForegroundColour(); + } SetName(rsName); SetParent(pParent); m_windowStyle = lStyle;