do not dereference `current` outside guard condition

Authored by sitter on Jul 11 2019, 2:57 PM.

Description

do not dereference current outside guard condition

Summary:
if current can be null, then clearly the one if must be nested inside
the guard if lest it trips over the nullptr when calling name().

Test Plan: builds

Reviewers: Plasma, apol

Reviewed By: apol

Subscribers: plasma-devel

Tags: Plasma

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

Details

Committed
sitterJul 12 2019, 12:48 PM
Reviewer
apol
Differential Revision
D22404: do not dereference `current` outside guard condition
Parents
R871:ec63673c3695: qobject_cast rather than dynamic_cast
Branches
Unknown
Tags
Unknown