summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin T. H. Sandsmark <martin.sandsmark@kde.org>2016-11-20 13:36:38 (GMT)
committerKurt Hindenburg <kurt.hindenburg@gmail.com>2016-11-24 14:42:29 (GMT)
commitd28afb6664459cf28d73d7617b74c49711ce7a86 (patch)
treea2646f1821856ae76b4ea26ebf918a0deb3fb476
parent6416009561ce800cde2824bbf369a32687b6fdfe (diff)
Only use foreground process info if valid
getProcessInfo() returned _foregroundProcessInfo without checking the return value of updateForegroundProcessInfo() indicating whether _foregroundProcessInfo was non-existent or invalid. I think this might be the solution to a bunch of recent crash bugs, but not closing them as I can't test. Also skipping RB because it is a simple patch and RB is down from here. CCBUG: 372401 CCBUG: 372620 CCBUG: 372619 CCBUG: 372593 (cherry picked from commit 40b1f0e851c115e1a2df79e7ec4bc4fe726d9e43)
-rw-r--r--src/Session.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/Session.cpp b/src/Session.cpp
index 3269550..d63c8a0 100644
--- a/src/Session.cpp
+++ b/src/Session.cpp
@@ -961,8 +961,7 @@ ProcessInfo* Session::getProcessInfo()
{
ProcessInfo* process = 0;
- if (isForegroundProcessActive()) {
- updateForegroundProcessInfo();
+ if (isForegroundProcessActive() && updateForegroundProcessInfo()) {
process = _foregroundProcessInfo;
} else {
updateSessionProcessInfo();