diff options
author | Michele Calgaro <[email protected]> | 2020-04-25 20:17:34 +0900 |
---|---|---|
committer | Michele Calgaro <[email protected]> | 2020-04-25 20:17:34 +0900 |
commit | 097107791f765a2996939e25463f79afe27be207 (patch) | |
tree | b3cb601caabe3871e0005779340f8873e17ec62f /src/traylabelmgr.cpp | |
parent | 63502d3ac497715af3379a88b2270b04192881ea (diff) | |
download | tdedocker-097107791f765a2996939e25463f79afe27be207.tar.gz tdedocker-097107791f765a2996939e25463f79afe27be207.zip |
Make sure to ignore applications that can't be restored.
Signed-off-by: Michele Calgaro <[email protected]>
Diffstat (limited to 'src/traylabelmgr.cpp')
-rw-r--r-- | src/traylabelmgr.cpp | 6 |
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); + } } } } |