gtk: do not call gtk_widget_get_window if drawing area is not initialized
-----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iQIcBAABAgAGBQJVFDsLAAoJEEy22O7T6HE4grQP/2cOVdC6wk/VMLahDr4MxICE 1a5eYDQldZM39wGgZTDy8CVcMtKN/O1YJi+FV/+CRZ+40sh1/Nd5tr0ltBcA8KkY Q5qumberkiZKT7c5h1S7BGt4RlPT+IiTI9w4gLugY34VNWnfnCBFEyW0TQZXpjVp XabObmD76y7Yt7IYgwhmebQF2E7Bhyazry7XlKi4ZxoANwqs7zAY0cqRFHuSoy4i Te/hVIUvHVIOgtITU70J5dIHVG9Ahckf7rZI0IHwGrFuVmQhPzoK4yMi7sEF7MQR z3q587ne5ycfw+51zkDR5ha/4PUHN9ZRFnkjZtSfOaj5Om+eZv2d7rUjeTZI9cTT pQgSIkZAlh+vYP4G989QvU+F++UWzJM9F4gWFZdUBV6Ph17+dfg6Qqjuqxlr3CgB a3e3UV+C4NRsWiDWkz3A9rciFh9cfbDSXlC/YnSQC/bIx3fiktpoHuzg3RBQjPY+ rLqbbovKEyfhy4vHq51VtBIofjP9nzXuNTgzPuhJhy5CFGuI06dErrNZiKkqNXri pNY1hMq1bYp+BHFUJXLvzGE9zpNyDEwOzuaCi5GGtTPOjOhG2ZyLBEpC4g/b/CLh GOBI67hc0vYe24S5IH/mBt4YzHtbq6cuVPdHcQUqx+6G337Wjrsr6TaS7FLk1qzE dSHYUaKtvL5VXTqIzH4q =/n5P -----END PGP SIGNATURE----- Merge remote-tracking branch 'remotes/kraxel/tags/pull-gtk-20150326-1' into staging gtk: do not call gtk_widget_get_window if drawing area is not initialized # gpg: Signature made Thu Mar 26 16:59:55 2015 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-20150326-1: gtk: do not call gtk_widget_get_window if drawing area is not initialized Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
commit
4ad9e2b36e
12
ui/gtk.c
12
ui/gtk.c
|
@ -294,6 +294,10 @@ static void gd_update_cursor(VirtualConsole *vc)
|
|||
return;
|
||||
}
|
||||
|
||||
if (!gtk_widget_get_realized(vc->gfx.drawing_area)) {
|
||||
return;
|
||||
}
|
||||
|
||||
window = gtk_widget_get_window(GTK_WIDGET(vc->gfx.drawing_area));
|
||||
if (s->full_screen || qemu_input_is_absolute() || s->ptr_owner == vc) {
|
||||
gdk_window_set_cursor(window, s->null_cursor);
|
||||
|
@ -458,6 +462,10 @@ static void gd_update(DisplayChangeListener *dcl,
|
|||
|
||||
trace_gd_update(vc->label, x, y, w, h);
|
||||
|
||||
if (!gtk_widget_get_realized(vc->gfx.drawing_area)) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (vc->gfx.convert) {
|
||||
pixman_image_composite(PIXMAN_OP_SRC, vc->gfx.ds->image,
|
||||
NULL, vc->gfx.convert,
|
||||
|
@ -540,6 +548,10 @@ static void gd_cursor_define(DisplayChangeListener *dcl,
|
|||
GdkPixbuf *pixbuf;
|
||||
GdkCursor *cursor;
|
||||
|
||||
if (!gtk_widget_get_realized(vc->gfx.drawing_area)) {
|
||||
return;
|
||||
}
|
||||
|
||||
pixbuf = gdk_pixbuf_new_from_data((guchar *)(c->data),
|
||||
GDK_COLORSPACE_RGB, true, 8,
|
||||
c->width, c->height, c->width * 4,
|
||||
|
|
Loading…
Reference in a new issue