Do not crash when icon's source is empty

Authored by ahiemstra on Dec 5 2019, 11:18 AM.

Description

Do not crash when icon's source is empty

Summary:
Kirigami gallery would crash on the overlay sheet page due to trying
to access m_theme which is a nullptr if setSource was never called.
Since trying to render an icon with an empty source does not make
much sense, just return when source is empty.

Test Plan: Kirigami Gallery no longer crashes on the overlay sheet page.

Reviewers: Kirigami, mart

Reviewed By: Kirigami, mart

Subscribers: plasma-devel

Tags: Kirigami

Differential Revision: https://phabricator.kde.org/D25759

Details

Committed
ahiemstraDec 5 2019, 1:23 PM
Reviewer
Kirigami
Differential Revision
D25759: Do not crash when icon's source is empty
Parents
R169:c769575acf9c: Don't use nullptr as flags (deprecated in qt5.15)
Branches
Unknown
Tags
Unknown