<br><br><div class="gmail_quote">On 9 March 2010 18:43, Wolfgang Ocker <span dir="ltr"><<a href="mailto:weo@reccoware.de">weo@reccoware.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I observed a crash in build_commands_table() when trying to open the<br>
project properties window:<br>
<br>
<br>
#0  build_commands_table (doc=<value optimized out>,<br>
    dst=<value optimized out>, table_data=<value optimized out>, ft=0x0)<br>
    at build.c:1862<br>
#1  0x000000000047bc0d in create_properties_dialog () at project.c:481<br>
#2  project_properties () at project.c:539<br>
#3  0x00000039da80ba8e in g_closure_invoke ()<br>
from /lib64/libgobject-2.0.so.0<br>
#4  0x00000039da820ec3 in ?? () from /lib64/libgobject-2.0.so.0<br>
#5  0x00000039da822259 in g_signal_emit_valist ()<br>
   from /lib64/libgobject-2.0.so.0<br>
#6  0x00000039da8227a3 in g_signal_emit ()<br>
from /lib64/libgobject-2.0.so.0<br>
#7  0x0000003653c7d3be in gtk_widget_activate ()<br>
   from /usr/lib64/libgtk-x11-2.0.so.0<br>
...<br>
<br>
ft is NULL there, which looks like a valid value, since ft is tested for<br>
NULL explicitly in line 1878. So I propose the following patch.<br>
<br>
Best regards,<br>
Wolfgang<br>
<br>
Index: src/build.c<br>
===================================================================<br>
--- src/build.c (revision 4745)<br>
+++ src/build.c (working copy)<br>
@@ -1859,7 +1859,7 @@<br>
        sep = gtk_hseparator_new();<br>
        gtk_table_attach(table, sep, 0, DC_N_COL, 1, 2, GTK_FILL, GTK_FILL | GTK_EXPAND,<br>
                entry_x_padding, sep_padding);<br>
-       if (ft->id != GEANY_FILETYPES_NONE)<br>
+       if (ft != NULL && ft->id != GEANY_FILETYPES_NONE)<br>
                txt = g_strdup_printf(_("%s Commands"), ft->title);<br>
        else<br>
                txt = g_strdup_printf(_("%s Commands"), _("No Filetype"));<br>
<br>
<br></blockquote><div><br>Thanks, one more change is needed, ft isn't initialised to NULL so on my machine it doesn't crash :-S, needs the declaration of ft to be initialised to NULL so your test will reliably fail if ft isn't set.<br>
<br>I will have to get a clean copy of trunk to apply the patch to (mine is full of changes :-) but will do so as soon as possible if no one beats me to it.<br><br>Cheers<br>Lex<br> <br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">

_______________________________________________<br>
Geany-devel mailing list<br>
<a href="mailto:Geany-devel@uvena.de">Geany-devel@uvena.de</a><br>
<a href="http://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel" target="_blank">http://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel</a><br>
</blockquote></div><br>