Commit 96bba08f authored by David Edmundson's avatar David Edmundson

Fix memory leak in notifications applet if only tracking jobs

Summary:
There's an early return before the memory cleanup that happens at the
end of this function.

Reviewers: #plasma, broulik

Reviewed By: #plasma, broulik

Subscribers: broulik, plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D17561
parent acebd8c8
......@@ -57,6 +57,7 @@ Column {
}
if (!notifications) {
delete runningJobs[source]
return
}
......@@ -65,12 +66,14 @@ Column {
// 1 = ERR_USER_CANCELED - don't show any notification at all
if (error == 1) {
delete runningJobs[source]
return
}
var message = runningJobs[source]["label1"] ? runningJobs[source]["label1"] : runningJobs[source]["label0"]
var infoMessage = runningJobs[source]["infoMessage"]
if (!message && !infoMessage) {
delete runningJobs[source]
return
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment