Add a check for whether the item isn't actually visible
Summary:
if width or height is 0 we just get warnings such as:
QImage::scaled: Image is a null image
And in the end we're performing void operations that we could skip
altohether.
Test Plan: Now I can run KAlgebra without the warning
Reviewers: Kirigami, mart
Reviewed By: Kirigami, mart
Subscribers: plasma-devel
Tags: Kirigami
Differential Revision: https://phabricator.kde.org/D6343