[meld/meld-3-16] diffmap: Avoid cairo surface creation for negative sizes (bgo#773985)
- From: Kai Willadsen <kaiw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [meld/meld-3-16] diffmap: Avoid cairo surface creation for negative sizes (bgo#773985)
- Date: Mon, 7 Nov 2016 21:38:35 +0000 (UTC)
commit 269fb7bbb81859dc4f9ace82f2084f45718ef84c
Author: Kai Willadsen <kai willadsen gmail com>
Date: Tue Nov 8 07:35:19 2016 +1000
diffmap: Avoid cairo surface creation for negative sizes (bgo#773985)
This can occur on initial allocations when we don't have a real
allocation ourselves yet, and the theme includes scroll arrows,
resulting in us trying to create a cairo surface with a negative
height.
meld/diffmap.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/meld/diffmap.py b/meld/diffmap.py
index bb44a76..232cf4a 100644
--- a/meld/diffmap.py
+++ b/meld/diffmap.py
@@ -123,7 +123,7 @@ class DiffMap(Gtk.DrawingArea):
# Hack to work around a cairo bug when calling create_similar
# https://bugs.freedesktop.org/show_bug.cgi?id=60519
- if not (width and height):
+ if not (width > 0 and height > 0):
return
context.translate(0, y_start)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]