Commit 2ff4c2a4 authored by Pavel Akopov's avatar Pavel Akopov Committed by Albert Astals Cid

Fix Plasma crash when left click on unconfigured Person plasmoid

Summary

when left click on unconfigured Person plasmoid - plasmashell segfaulted.
plasmashell 5.12.6

kf5-kpeople-devel-5.47
kde5-ktp-desktop-applets-18.04.2

Test Plan

    Add Person plasmoid to desktop.
    Do left click on it (plasmoid).
    segmentation faults...

Differential Revision: https://phabricator.kde.org/D14232
parent 740dd327
......@@ -27,13 +27,17 @@ import org.kde.plasma.plasmoid 2.0
PlasmaCore.IconItem {
id: personPhoto
source: personData.person.photo
property bool isPersonSelected: (personData.personUri != "")
source: isPersonSelected ? personData.person.photo : "user"
property int minActionWidth
function actionTriggered(id)
{
actions.triggerAction(id);
if (isPersonSelected)
actions.triggerAction(id);
else
plasmoid.action("configure").trigger();
}
MouseArea {
......
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