summaryrefslogtreecommitdiffstats
path: root/src/traylabelmgr.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/traylabelmgr.cpp')
-rw-r--r--src/traylabelmgr.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/traylabelmgr.cpp b/src/traylabelmgr.cpp
index 54b98bd..b011288 100644
--- a/src/traylabelmgr.cpp
+++ b/src/traylabelmgr.cpp
@@ -543,7 +543,11 @@ void TrayLabelMgr::doRestoreSession()
{
TRACE("Restoring Application[%s]", pname.ascii());
manageTrayLabel(new TQTrayLabel(TQStringList::split(" ", pname), 0));
- mTrayLabels.getFirst()->restoreState(config);
+ if (!mTrayLabels.getFirst()->restoreState(config))
+ {
+ // Failed to restore the application, remove the tray label
+ delete mTrayLabels.take(0);
+ }
}
}
}