Ref/deref DataEngines even if the metadata is invalid

Authored by davidedmundson on Mar 6 2017, 12:12 AM.

Description

Ref/deref DataEngines even if the metadata is invalid

Summary:
Just because the metadata is invalid doesn't mean the DataEngine
actually failed to load, we're still returning a valid object, and as
seen with the MPris DataEngine bug. It's important that we still release
it properly.

It looks like this was designed to make sure you don't delete the null
data engine multiple times, but that shouldn't cause an issue here.

Test Plan: Plasma

Reviewers: Plasma, mart

Reviewed By: mart

Subscribers: plasma-devel, Frameworks

Tags: Plasma, Frameworks

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

Details