[Freeciv-Dev] Re: (PR#14984) GTK2 client segfaults at end of game
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
<URL: http://bugs.freeciv.org/Ticket/Display.html?id=14984 >
2005/12/26, Jason Short wrote:
> > According to its comment, update_unit_info_label is supposed to clear
> > labels when its argument is NULL. Yet it does not test for it, and
> > get_unit_info_label_text1 later segfaults when it tries to get the
> > size of punits.
>
> An obnoxious problem, but this should fix it.
Thanks, it fixes the issue. For the sake of homogeneity, it would make
sense to apply the following one-liner though, since the
get_unit_info_label_text* functions return a static buffer and it has
already been cleared:
--- client/text.c (révision 11388)
+++ client/text.c (copie de travail)
@@ -667,7 +667,7 @@
astr_clear(&str);
if (!punits) {
- return "";
+ return str.str;
}
count = unit_list_size(punits);
|
|