Fix crash due to NULL in project build preferences ( thanks to

Wolfgang Ocker )


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4749 ea778897-0a13-0410-b9d1-a72fbfd435f5
This commit is contained in:
Lex Trotman 2010-03-10 00:55:21 +00:00
parent 2266594ecd
commit ebe459f94f
3 changed files with 9 additions and 2 deletions

View File

@ -1,3 +1,10 @@
2010-03-10 Lex Trotman <elextr.at.gmail.dot.com>
* src/build.c, src/project.c
Fix crash due to NULL in project build preferences ( thanks to
Wolfgang Ocker )
2010-03-09 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
* src/utils.c, src/utils.h, src/search.c, src/search.h,

View File

@ -1859,7 +1859,7 @@ GtkWidget *build_commands_table(GeanyDocument *doc, GeanyBuildSource dst, TableD
sep = gtk_hseparator_new();
gtk_table_attach(table, sep, 0, DC_N_COL, 1, 2, GTK_FILL, GTK_FILL | GTK_EXPAND,
entry_x_padding, sep_padding);
if (ft->id != GEANY_FILETYPES_NONE)
if (ft != NULL && ft->id != GEANY_FILETYPES_NONE)
txt = g_strdup_printf(_("%s Commands"), ft->title);
else
txt = g_strdup_printf(_("%s Commands"), _("No Filetype"));

View File

@ -401,7 +401,7 @@ static void create_properties_dialog(PropertyDialogElements *e)
GtkWidget *label;
GtkWidget *swin;
GeanyDocument *doc = document_get_current();
GeanyFiletype *ft;
GeanyFiletype *ft = NULL;
e->dialog = create_project_dialog();
gtk_window_set_transient_for(GTK_WINDOW(e->dialog), GTK_WINDOW(main_widgets.window));