summaryrefslogtreecommitdiff
path: root/src/gui/widgets/setupitem.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-02-21 02:12:14 +0300
committerAndrei Karas <akaras@inbox.ru>2016-02-21 02:53:45 +0300
commitff10b54405fe8980a022e98cd79d912c1f0ac353 (patch)
tree679a8096d1e30858760196c2a2ef95ddd6bcd58c /src/gui/widgets/setupitem.cpp
parent6c01b391c288622d8e360d823c9c1e35a874fa58 (diff)
downloadplus-ff10b54405fe8980a022e98cd79d912c1f0ac353.tar.gz
plus-ff10b54405fe8980a022e98cd79d912c1f0ac353.tar.bz2
plus-ff10b54405fe8980a022e98cd79d912c1f0ac353.tar.xz
plus-ff10b54405fe8980a022e98cd79d912c1f0ac353.zip
Add missing checks.
Diffstat (limited to 'src/gui/widgets/setupitem.cpp')
-rw-r--r--src/gui/widgets/setupitem.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/gui/widgets/setupitem.cpp b/src/gui/widgets/setupitem.cpp
index be9f2000f..511ab90ab 100644
--- a/src/gui/widgets/setupitem.cpp
+++ b/src/gui/widgets/setupitem.cpp
@@ -406,7 +406,7 @@ void SetupItemTextField::action(const ActionEvent &event)
return;
const std::string &eventId = event.getId();
- if (eventId == mWidget->getActionEventId())
+ if (mWidget && eventId == mWidget->getActionEventId())
{
fromWidget();
}
@@ -544,7 +544,7 @@ void SetupItemIntTextField::action(const ActionEvent &event)
return;
const std::string &eventId = event.getId();
- if (eventId == mWidget->getActionEventId())
+ if (mWidget && eventId == mWidget->getActionEventId())
{
fromWidget();
}
@@ -1153,14 +1153,15 @@ void SetupItemSound::addMoreControls()
{
mButton = new Button(this, BUTTON_PLAY, 16, 16,
mEventName + "_PLAY", this);
- mHorizont->add(mButton);
+ if (mHorizont)
+ mHorizont->add(mButton);
}
void SetupItemSound::action(const ActionEvent &event)
{
if (event.getId() == mEventName + "_PLAY")
{
- if (mSlider->getSelected())
+ if (mSlider && mSlider->getSelected())
{
soundManager.playGuiSfx(branding.getStringValue("systemsounds")
.append(mSlider->getSelectedString()).append(".ogg"));