Prevent emitting result twice when second subjob has an error
Summary:
This is based on a patch provided by dfaure, I merely implemented the
minimal test case.
Reviewers: dfaure, bensi, franckarrecot
Differential Revision: https://phabricator.kde.org/D7311