Skip to content
Commit 9f6f1c55 authored by Jan Paul Batrina's avatar Jan Paul Batrina
Browse files

KFilePlaceEditDialog: Always preserve previous icon

When the original item's url is trash:/, m_iconButton wasn't
instantiated since isIconEditable() will return false. If the url is
edited to point somewhere else, isIconEditable() will return false,
making the check in KFilePlaceEditDialog::icon() fail to guard access
to m_iconButton which points to nullptr. This crash can be seen by
trying to change the "Trash" entry's location in Dolphin's Places panel.

This patch makes it so that m_iconButton is always instantiated to
prevent the crash and also to always preserve the original icon before editing.

BUG: 439622
parent 059b0568
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment