[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 01/12] ui: gtk: fix crash when terminal inner-border
From: |
Gerd Hoffmann |
Subject: |
[Qemu-devel] [PULL 01/12] ui: gtk: fix crash when terminal inner-border is NULL |
Date: |
Tue, 10 May 2016 07:51:46 +0200 |
From: Cole Robinson <address@hidden>
VTE terminal inner-border can be NULL. The vte-0.36 (API 2.90)
code checks for the condition too so I assume it's not just a bug
Fixes a crash on Fedora 24 with gtk 3.20
Signed-off-by: Cole Robinson <address@hidden>
Message-id: address@hidden
Signed-off-by: Gerd Hoffmann <address@hidden>
---
ui/gtk.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/ui/gtk.c b/ui/gtk.c
index f372a6d..9876d89 100644
--- a/ui/gtk.c
+++ b/ui/gtk.c
@@ -340,10 +340,12 @@ static void gd_update_geometry_hints(VirtualConsole *vc)
geo.min_height = geo.height_inc * VC_TERM_Y_MIN;
mask |= GDK_HINT_MIN_SIZE;
gtk_widget_style_get(vc->vte.terminal, "inner-border", &ib, NULL);
- geo.base_width += ib->left + ib->right;
- geo.base_height += ib->top + ib->bottom;
- geo.min_width += ib->left + ib->right;
- geo.min_height += ib->top + ib->bottom;
+ if (ib) {
+ geo.base_width += ib->left + ib->right;
+ geo.base_height += ib->top + ib->bottom;
+ geo.min_width += ib->left + ib->right;
+ geo.min_height += ib->top + ib->bottom;
+ }
geo_widget = vc->vte.terminal;
#endif
}
--
1.8.3.1
- [Qemu-devel] [PULL 00/12] ui patch queue, Gerd Hoffmann, 2016/05/10
- [Qemu-devel] [PULL 04/12] configure: error on unknown --with-sdlabi value, Gerd Hoffmann, 2016/05/10
- [Qemu-devel] [PULL 02/12] ui: sdl2: Release grab before opening console window, Gerd Hoffmann, 2016/05/10
- [Qemu-devel] [PULL 12/12] spice/gl: add & use qemu_spice_gl_monitor_config, Gerd Hoffmann, 2016/05/10
- [Qemu-devel] [PULL 06/12] configure: report GTK version, Gerd Hoffmann, 2016/05/10
- [Qemu-devel] [PULL 05/12] configure: add echo_version helper, Gerd Hoffmann, 2016/05/10
- [Qemu-devel] [PULL 01/12] ui: gtk: fix crash when terminal inner-border is NULL,
Gerd Hoffmann <=
- [Qemu-devel] [PULL 10/12] ui: gtk: Fix some deprecation warnings, Gerd Hoffmann, 2016/05/10
- [Qemu-devel] [PULL 07/12] configure: report SDL version, Gerd Hoffmann, 2016/05/10
- [Qemu-devel] [PULL 08/12] configure: support vte-2.91, Gerd Hoffmann, 2016/05/10
- [Qemu-devel] [PULL 09/12] ui: gtk: Fix a runtime warning on vte >= 0.37, Gerd Hoffmann, 2016/05/10
- [Qemu-devel] [PULL 03/12] configure: build SDL if only SDL2 available, Gerd Hoffmann, 2016/05/10
- [Qemu-devel] [PULL 11/12] ui/gtk: copy to clipboard support, Gerd Hoffmann, 2016/05/10
- Re: [Qemu-devel] [PULL 00/12] ui patch queue, Cole Robinson, 2016/05/10
- Re: [Qemu-devel] [PULL 00/12] ui patch queue, Peter Maydell, 2016/05/12