Be more paranoid about parent window possibly being NULL (partly fixes #11115).
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61905 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
bf24fcddc3
commit
adfe31645d
@ -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;
|
||||
|
@ -126,8 +126,11 @@ bool wxSpinCtrl::Create( wxWindow* pParent,
|
||||
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;
|
||||
|
Loading…
Reference in New Issue
Block a user