Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit 3eb3e64d authored by Martin Flöser's avatar Martin Flöser

[platforms/x11] Fix int-in-bool-context warning

The intention is to prevent division by zero, so make this explicit by
comparing the values against 0.
parent f47cc621
......@@ -74,7 +74,7 @@ void XRandRScreens::update()
float refreshRate = -1.0f;
for (int j = 0; j < resources->num_modes; ++j) {
if (info->mode == modes[j].id) {
if (modes[j].htotal*modes[j].vtotal) { // BUG 313996
if (modes[j].htotal != 0 && modes[j].vtotal != 0) { // BUG 313996
// refresh rate calculation - WTF was wikipedia 1998 when I needed it?
int dotclock = modes[j].dot_clock,
vtotal = modes[j].vtotal;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment