Complete.Org: Mailing Lists: Archives: freeciv-dev: July 2006:
[Freeciv-Dev] Re: [Fwd: Re: Re: (PR#18293) Missing building tag crashes
Home

[Freeciv-Dev] Re: [Fwd: Re: Re: (PR#18293) Missing building tag crashes

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Subject: [Freeciv-Dev] Re: [Fwd: Re: Re: (PR#18293) Missing building tag crashes science dialog]
From: "Ricky" <iainuki@xxxxxxxxx>
Date: Thu, 20 Jul 2006 15:53:54 -0700
Reply-to: bugs@xxxxxxxxxxx

<URL: http://bugs.freeciv.org/Ticket/Display.html?id=18293 >

Good...

But i cannot build from the source.. when an official build will be created??

--- Marko Lindqvist <cazfi74@xxxxxxxxx> ha scritto: 

> 
> <URL: http://bugs.freeciv.org/Ticket/Display.html?id=18293 >
> 
> Marko Lindqvist wrote:
> > On 7/9/06, Marko Lindqvist <cazfi74@xxxxxxxxx> wrote:
> >>
> >>   You should be able to avoid crash by adding missing b.amusement_park
> >> tag in to buildings.spec.
> >>
> >>   Of course missing tag should not cause silent crash.
> > 
> > Client should print message about missing tag in startup and science
> > dialog should work without buildings graphics.
> 
>    There already is LOG_VERBOSE message about missing building tags while
> tileset is loaded. Attached patch takes care of the crash.
> 
> 
>    - ML
> 
> 
> > diff -Nurd -X.diff_ignore freeciv/client/reqtree.c freeciv/client/reqtree.c
> --- freeciv/client/reqtree.c  2006-07-20 21:39:36.640625000 +0300
> +++ freeciv/client/reqtree.c  2006-07-20 22:38:31.015625000 +0300
> @@ -179,9 +179,12 @@
>            if (preq->source.type == REQ_TECH
>             && preq->source.value.tech == node->tech) {
>           sprite = get_building_sprite(tileset, impr_type);
> -         get_sprite_dimensions(sprite, &swidth, &sheight);
> -            max_icon_height = MAX(max_icon_height, sheight);
> -            icons_width_sum += swidth + 2;
> +            /* Improvement icons are not guaranteed to exist */
> +            if (sprite) {
> +              get_sprite_dimensions(sprite, &swidth, &sheight);
> +              max_icon_height = MAX(max_icon_height, sheight);
> +              icons_width_sum += swidth + 2;
> +            }
>         }
>          } requirement_vector_iterate_end;
>        } impr_type_iterate_end;
> @@ -950,13 +953,16 @@
>                if (preq->source.type == REQ_TECH
>                 && preq->source.value.tech == node->tech) {
>               sprite = get_building_sprite(tileset, impr_type);
> -             get_sprite_dimensions(sprite, &swidth, &sheight);
> -             canvas_put_sprite_full(pcanvas,
> -                                    icon_startx,
> -                                    starty + text_h + 4
> -                                    + (height - text_h - 4 - sheight) / 2,
> -                                    sprite);
> -             icon_startx += swidth + 2;
> +                /* Improvement icons are not guaranteed to exist */
> +                if (sprite) {
> +                  get_sprite_dimensions(sprite, &swidth, &sheight);
> +                  canvas_put_sprite_full(pcanvas,
> +                                         icon_startx,
> +                                         starty + text_h + 4
> +                                         + (height - text_h - 4 - sheight) / 
> 2,
> +                                         sprite);
> +                  icon_startx += swidth + 2;
> +                }
>             }
>           } requirement_vector_iterate_end;
>            } impr_type_iterate_end;
> 
> 


->TESTICULA TACTA OMNIA MALA FUGANT<-
-> IN OMNIA PERICULA TASTA TESTICOLA <-
<a href="http://www.gozzilioni.net";>il sito<br>
<img src="http://iainuki.supereva.it/banner-gozzilioni.gif";></a>
<a href="http://www.fairyking.net/party";>il mondo</a>
Il D20 ha ragione, il DM di più.
LFC: http://www.lamufansclub.com
(ICQ:158244154) (Y!m:iainuki) (MSN:iainuki4)

Chiacchiera con i tuoi amici in tempo reale! 
 http://it.yahoo.com/mail_it/foot/*http://it.messenger.yahoo.com 





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