Fix division by zero errors in QueryTable
Summary:
Code used to try to divide by zero. Fixed it to always check for the
denominator being 0 beforehand.
Original patch by Zoltan Ivanfi
BUG: 402708
FIXED-IN: 5.0.3
Reviewers: KMyMoney, tbaumgart
Reviewed By: KMyMoney, tbaumgart
Subscribers: aacid, tbaumgart, ostroffjh
Differential Revision: https://phabricator.kde.org/D17871