projects
/
gtk+3.0.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bb4bc57
)
Fix division by zero when calculating the refresh rate
author
Emilio Pozuelo Monfort
<pochu27@gmail.com>
Wed, 20 Jul 2016 15:09:15 +0000
(17:09 +0200)
committer
Sjoerd Simons
<sjoerd@debian.org>
Fri, 30 Sep 2016 12:36:52 +0000
(12:36 +0000)
Gbp-Pq: Name 0001-Fix-division-by-zero-when-calculating-the-refresh-ra.patch
gdk/x11/gdkscreen-x11.c
patch
|
blob
|
history
diff --git
a/gdk/x11/gdkscreen-x11.c
b/gdk/x11/gdkscreen-x11.c
index 450872d99df56b791b7e27efae7a3c4411948941..acc1b1a44ce4e227ed7f14b2ceacdff76f3d18f0 100644
(file)
--- a/
gdk/x11/gdkscreen-x11.c
+++ b/
gdk/x11/gdkscreen-x11.c
@@
-636,7
+636,8
@@
init_randr13 (GdkScreen *screen, gboolean *changed)
XRRModeInfo *xmode = &resources->modes[j];
if (xmode->id == crtc->mode)
{
- refresh_rate = (1000 * xmode->dotClock) / (xmode->hTotal *xmode->vTotal);
+ if (xmode->hTotal && xmode->vTotal)
+ refresh_rate = (1000 * xmode->dotClock) / (xmode->hTotal *xmode->vTotal);
break;
}
}