[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [plasma-workspace] shell: Don't crash when createContainment returns NULL
From: Ivan Čukić <ivan.cukic () kde ! org>
Date: 2014-05-31 13:28:19
Message-ID: E1WqjKd-0007uq-Rg () scm ! kde ! org
[Download RAW message or body]
Git commit 0f8abf96e89ef329a63b55592db9da9ec41b0b54 by Ivan Čukić.
Committed on 31/05/2014 at 13:26.
Pushed by ivan into branch 'master'.
Don't crash when createContainment returns NULL
M +8 -2 shell/shellcorona.cpp
http://commits.kde.org/plasma-workspace/0f8abf96e89ef329a63b55592db9da9ec41b0b54
diff --git a/shell/shellcorona.cpp b/shell/shellcorona.cpp
index 06e1743..1972d5b 100644
--- a/shell/shellcorona.cpp
+++ b/shell/shellcorona.cpp
@@ -624,6 +624,9 @@ void ShellCorona::addOutput(KScreen::Output *output)
if (!containment) {
containment = createContainmentForActivity(currentActivity, insertPosition);
}
+ if (!containment) {
+ return;
+ }
QAction *removeAction = containment->actions()->action("remove");
if (removeAction) {
@@ -680,8 +683,11 @@ Plasma::Containment \
*ShellCorona::createContainmentForActivity(const QString& ac }
Plasma::Containment *containment = \
createContainment(d->desktopDefaultsConfig.readEntry("Containment", \
plugin));
- containment->setActivity(activity);
- insertContainment(activity, screenNum, containment);
+
+ if (containment) {
+ containment->setActivity(activity);
+ insertContainment(activity, screenNum, containment);
+ }
return containment;
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic