[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]
<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
|
|