[Freeciv-Dev] Re: (PR#7216) take again client crash
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
<URL: http://rt.freeciv.org/Ticket/Display.html?id=7216 >
>> > I also propose a patch like this or similar:
>> >
>> > ***************************************************************/
>> > struct tile *map_get_tile(int x, int y)
>> > {
>> > + assert(map.tiles != NULL);
>> > return MAP_TILE(x, y);
>> > }
>>
>> absolutely not. Do you know how many times map_get_tile gets called?
>
> It is one test on a value already loaded into a register.
But it is useless since MAP_TILE will result in a segfault anyway. And
this segfault will be more useful than the one given by the assert.
jason
|
|