diff options
-rw-r--r-- | vcl/source/app/salvtables.cxx | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx index e19f988adb29..435a8f6f0556 100644 --- a/vcl/source/app/salvtables.cxx +++ b/vcl/source/app/salvtables.cxx @@ -3342,7 +3342,10 @@ public: m_xButton->SetLoseFocusHdl(LINK(this, SalInstanceSpinButton, LoseFocusHdl)); m_xButton->SetOutputHdl(LINK(this, SalInstanceSpinButton, OutputHdl)); m_xButton->SetInputHdl(LINK(this, SalInstanceSpinButton, InputHdl)); - m_xButton->GetSubEdit()->SetActivateHdl(LINK(this, SalInstanceSpinButton, ActivateHdl)); + if (Edit* pEdit = m_xButton->GetSubEdit()) + pEdit->SetActivateHdl(LINK(this, SalInstanceSpinButton, ActivateHdl)); + else + m_xButton->SetActivateHdl(LINK(this, SalInstanceSpinButton, ActivateHdl)); } virtual int get_value() const override @@ -3404,6 +3407,8 @@ public: { if (Edit* pEdit = m_xButton->GetSubEdit()) pEdit->SetActivateHdl(Link<Edit&, bool>()); + else + m_xButton->SetActivateHdl(Link<Edit&, bool>()); m_xButton->SetInputHdl(Link<sal_Int64*, TriState>()); m_xButton->SetOutputHdl(Link<Edit&, bool>()); m_xButton->SetLoseFocusHdl(Link<Control&, void>()); |