* fixed crash on gtk2

git-svn-id: trunk@11930 -
This commit is contained in:
marc 2007-09-03 22:39:06 +00:00
parent 2ba030118e
commit 6bf56052f7
2 changed files with 2 additions and 2 deletions

View File

@ -290,7 +290,6 @@ begin
then Exit; // this depth is not supported
GdkImage := gdk_image_new(GDK_IMAGE_FASTEST, Visual, ImgWidth, ImgHeight);
gdk_visual_unref(Visual);
{$ifdef VerboseRawImage}
{DebugLn('TGtkWidgetSet.CreateBitmapFromRawImage GdkImage: ',

View File

@ -1926,7 +1926,8 @@ begin
Depth := gdk_drawable_get_depth(GdiObject^.GDIPixmapObject.Image);
gdk_visual_unref(GdiObject^.Visual);
if not GdiObject^.SystemVisual
then gdk_visual_unref(GdiObject^.Visual);
GdiObject^.Visual := gdk_window_get_visual(GdiObject^.GDIPixmapObject.Image);
if GdiObject^.Visual = nil