Complete.Org: Mailing Lists: Archives: freeciv-dev: November 2004:
[Freeciv-Dev] Re: (PR#11174) client segfaults w/o map_canvas_resized()
Home

[Freeciv-Dev] Re: (PR#11174) client segfaults w/o map_canvas_resized()

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: fbriere@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: (PR#11174) client segfaults w/o map_canvas_resized()
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Tue, 30 Nov 2004 10:50:21 -0800
Reply-to: rt@xxxxxxxxxxx

<URL: http://rt.freeciv.org/Ticket/Display.html?id=11174 >

Frédéric Brière wrote:
> On Fri, Nov 26, 2004 at 02:40:22PM -0500, Frédéric Brière wrote:
> 
>> void init_mapcanvas_and_overview(void)
>> {
>>+  /* Create a dummy map to make sure mapview_canvas.store is never NULL */
>>+  map_canvas_resized(1, 1);
>> }
> 
> 
> Maybe I'm calling init_mapcanvas_and_overview() too late, but this is
> causing my map to start out as one single tile.  You might want to check
> the other clients just to be sure.  (Gosh, I hope it's just me.)

You have to call map_canvas_resized after init_mapcanvas_and_overview to 
resize your screen.  So the map_canvas_resized() call in 
init_mapcanvas_and_overview really isn't that helpful - but it does 
avoid a potential crash.  The only way it could really be improved is to 
give width/height parameters to the init_mapcanvas_and_overview() 
function, so the caller is forced to pick a size at the beginning.  But 
I think this is overkill.

jason





[Prev in Thread] Current Thread [Next in Thread]