[gtk/wip/otte/gleanup] xxx: drawcontext without surface
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/otte/gleanup] xxx: drawcontext without surface
- Date: Mon, 5 Jul 2021 00:06:46 +0000 (UTC)
commit 3c278ea5748bf4cafeee583ac112b600d71044ed
Author: Benjamin Otte <otte redhat com>
Date: Mon Jul 5 00:30:55 2021 +0200
xxx: drawcontext without surface
gdk/gdkdrawcontext.c | 18 ++++++++++--------
1 file changed, 10 insertions(+), 8 deletions(-)
---
diff --git a/gdk/gdkdrawcontext.c b/gdk/gdkdrawcontext.c
index 51edced6b7..d1c5cd0960 100644
--- a/gdk/gdkdrawcontext.c
+++ b/gdk/gdkdrawcontext.c
@@ -107,15 +107,17 @@ gdk_draw_context_set_property (GObject *gobject,
case PROP_SURFACE:
priv->surface = g_value_dup_object (value);
- g_assert (priv->surface != NULL);
- priv->surface->draw_contexts = g_slist_prepend (priv->surface->draw_contexts, context);
- if (priv->display)
+ if (priv->surface)
{
- g_assert (priv->display == gdk_surface_get_display (priv->surface));
- }
- else
- {
- priv->display = g_object_ref (gdk_surface_get_display (priv->surface));
+ priv->surface->draw_contexts = g_slist_prepend (priv->surface->draw_contexts, context);
+ if (priv->display)
+ {
+ g_assert (priv->display == gdk_surface_get_display (priv->surface));
+ }
+ else
+ {
+ priv->display = g_object_ref (gdk_surface_get_display (priv->surface));
+ }
}
break;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]