From: Olivier Andrieu MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <16039.57925.546627.435556 at akasha.ijm.jussieu.fr> Date: Thu, 24 Apr 2003 15:10:29 +0200 To: Henri DF Cc: lablgtk at kaba.or.jp Subject: Re: bug when drawing#segments [] In-Reply-To: References: henridf@lcavsun1.epfl.ch [Thursday 24 April 2003] : > > Lablgtk crashes (runs out of memory) when you try draw an empty > segments list. Yes, it seems that the empty list should be treated separately. This patch should solve the pb : --- gdk.ml.bug 2003-04-24 15:00:27.000000000 +0200 +++ gdk.ml 2003-04-24 15:04:34.000000000 +0200 @@ -536,7 +536,9 @@ let lines w gc l = f_pointarray (lines w gc) l external segments : [>`drawable] obj -> gc -> SegmentArray.t -> unit = "ml_gdk_draw_segments" - let segments w gc l = f_segmentarray (segments w gc) l + let segments w gc = function + | [] -> () + | l -> f_segmentarray (segments w gc) l end module Rgb = struct -- Olivier