summaryrefslogtreecommitdiff
path: root/gdk/gdkpango.c
diff options
context:
space:
mode:
authorSven Neumann <sven@gimp.org>2001-08-06 15:52:46 +0000
committerSven Neumann <neo@src.gnome.org>2001-08-06 15:52:46 +0000
commitadca251babd551e085fa6c7ed492dcc3e050b4d3 (patch)
tree844e88d0b06b6250bb7c6e49cf4a74d95999220f /gdk/gdkpango.c
parent727cdae76935c12379dfbba6962872153d59b37a (diff)
downloadgtk+-adca251babd551e085fa6c7ed492dcc3e050b4d3.tar.gz
check if info->colormap != NULL before unref'ing it. It might have been
2001-08-06 Sven Neumann <sven@gimp.org> * gdk/gdkpango.c (gdk_pango_context_destroy): check if info->colormap != NULL before unref'ing it. It might have been set to NULL using gdk_pango_context_set_colormap().
Diffstat (limited to 'gdk/gdkpango.c')
-rw-r--r--gdk/gdkpango.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/gdk/gdkpango.c b/gdk/gdkpango.c
index 4eeae8face..d4f11d9876 100644
--- a/gdk/gdkpango.c
+++ b/gdk/gdkpango.c
@@ -52,7 +52,8 @@ static void gdk_pango_get_item_properties (PangoItem *item,
static void
gdk_pango_context_destroy (GdkPangoContextInfo *info)
{
- gdk_colormap_unref (info->colormap);
+ if (info->colormap)
+ gdk_colormap_unref (info->colormap);
g_free (info);
}
@@ -336,7 +337,7 @@ gdk_draw_layout_line_with_colors (GdkDrawable *drawable,
}
/**
- * gdk_draw_layout:
+ * gdk_draw_layout_with_colors:
* @drawable: the drawable on which to draw string
* @gc: base graphics context to use
* @x: the X position of the left of the layout (in pixels)