aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2014-11-21 13:22:18 +0000
committerPeter Maydell <peter.maydell@linaro.org>2014-11-21 13:22:18 +0000
commita00c1173385741007f71ce505d092f4cc174f449 (patch)
treed57daeed231b0c39f116512d90a3b36179e20859
parent9c7074da5ec64e1fd61df881ab291f75541ff2b0 (diff)
parentb310a2a6095ec927a42cc1aba520a316be0faf51 (diff)
downloadqemu-a00c1173385741007f71ce505d092f4cc174f449.zip
qemu-a00c1173385741007f71ce505d092f4cc174f449.tar.gz
qemu-a00c1173385741007f71ce505d092f4cc174f449.tar.bz2
Merge remote-tracking branch 'remotes/kraxel/tags/pull-gtk-20141121-1' into staging
gtk: two bugfixes for 2.2. # gpg: Signature made Fri 21 Nov 2014 07:38:45 GMT using RSA key ID D3E87138 # gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>" # gpg: aka "Gerd Hoffmann <gerd@kraxel.org>" # gpg: aka "Gerd Hoffmann (private) <kraxel@gmail.com>" * remotes/kraxel/tags/pull-gtk-20141121-1: gtk: Don't crash if -nodefaults gtk: fix possible memory leak about local_err Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
-rw-r--r--ui/gtk.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/ui/gtk.c b/ui/gtk.c
index 38bf463..0385757 100644
--- a/ui/gtk.c
+++ b/ui/gtk.c
@@ -1666,10 +1666,9 @@ static GSList *gd_vc_gfx_init(GtkDisplayState *s, VirtualConsole *vc,
QemuConsole *con, int idx,
GSList *group, GtkWidget *view_menu)
{
- Error *local_err = NULL;
Object *obj;
- obj = object_property_get_link(OBJECT(con), "device", &local_err);
+ obj = object_property_get_link(OBJECT(con), "device", NULL);
if (obj) {
vc->label = g_strdup_printf("%s", object_get_typename(obj));
} else {
@@ -1910,15 +1909,17 @@ void gtk_display_init(DisplayState *ds, bool full_screen, bool grab_on_hover)
#ifdef VTE_RESIZE_HACK
{
VirtualConsole *cur = gd_vc_find_current(s);
- int i;
-
- for (i = 0; i < s->nb_vcs; i++) {
- VirtualConsole *vc = &s->vc[i];
- if (vc && vc->type == GD_VC_VTE && vc != cur) {
- gtk_widget_hide(vc->vte.terminal);
+ if (cur) {
+ int i;
+
+ for (i = 0; i < s->nb_vcs; i++) {
+ VirtualConsole *vc = &s->vc[i];
+ if (vc && vc->type == GD_VC_VTE && vc != cur) {
+ gtk_widget_hide(vc->vte.terminal);
+ }
}
+ gd_update_windowsize(cur);
}
- gd_update_windowsize(cur);
}
#endif