summaryrefslogtreecommitdiff
path: root/src/gui/widgets/setuptabscroll.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/widgets/setuptabscroll.cpp')
-rw-r--r--src/gui/widgets/setuptabscroll.cpp18
1 files changed, 12 insertions, 6 deletions
diff --git a/src/gui/widgets/setuptabscroll.cpp b/src/gui/widgets/setuptabscroll.cpp
index 30bb66469..e9917b090 100644
--- a/src/gui/widgets/setuptabscroll.cpp
+++ b/src/gui/widgets/setuptabscroll.cpp
@@ -90,25 +90,31 @@ void SetupTabScroll::addControl(SetupItem *widget, std::string event)
void SetupTabScroll::apply()
{
- std::map<std::string, SetupItem*>::iterator iter;
+ std::map<std::string, SetupItem*>::const_iterator iter;
for (iter = mItems.begin(); iter != mItems.end(); ++ iter)
- (*iter).second->apply((*iter).first);
+ {
+ if ((*iter).second)
+ (*iter).second->apply((*iter).first);
+ }
}
void SetupTabScroll::cancel()
{
- std::map<std::string, SetupItem*>::iterator iter;
+ std::map<std::string, SetupItem*>::const_iterator iter;
for (iter = mItems.begin(); iter != mItems.end(); ++ iter)
- (*iter).second->cancel((*iter).first);
+ {
+ if ((*iter).second)
+ (*iter).second->cancel((*iter).first);
+ }
}
void SetupTabScroll::externalUpdated()
{
- std::map<std::string, SetupItem*>::iterator iter;
+ std::map<std::string, SetupItem*>::const_iterator iter;
for (iter = mItems.begin(); iter != mItems.end(); ++ iter)
{
SetupItem *widget = (*iter).second;
- if (!widget->isMainConfig())
+ if (widget && !widget->isMainConfig())
(*iter).second->externalUpdated((*iter).first);
}
}