From c640644c8f04b5fde1858863382ecfdc5d2963fe Mon Sep 17 00:00:00 2001 From: marc Date: Mon, 3 Sep 2007 23:09:13 +0000 Subject: [PATCH] * fixed unreferencing nil colormap git-svn-id: trunk@11932 - --- lcl/interfaces/gtk/gtkwinapi.inc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lcl/interfaces/gtk/gtkwinapi.inc b/lcl/interfaces/gtk/gtkwinapi.inc index 86246ee2fb..9a0be998ae 100644 --- a/lcl/interfaces/gtk/gtkwinapi.inc +++ b/lcl/interfaces/gtk/gtkwinapi.inc @@ -1942,7 +1942,8 @@ begin GdiObject^.SystemVisual := False; end; - gdk_colormap_unref(GdiObject^.Colormap); + if GdiObject^.Colormap <> nil + then gdk_colormap_unref(GdiObject^.Colormap); GdiObject^.Colormap := gdk_colormap_new(GdiObject^.Visual, GdkFalse); GdiObject^.GDIBitmapType := gbPixmap;