SF.net SVN: geany:[4749] trunk

elextr at users.sourceforge.net elextr at xxxxx
Wed Mar 10 00:55:21 UTC 2010


Revision: 4749
          http://geany.svn.sourceforge.net/geany/?rev=4749&view=rev
Author:   elextr
Date:     2010-03-10 00:55:21 +0000 (Wed, 10 Mar 2010)

Log Message:
-----------
Fix crash due to NULL in project build preferences ( thanks to 
Wolfgang Ocker )

Modified Paths:
--------------
    trunk/ChangeLog
    trunk/src/build.c
    trunk/src/project.c

Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog	2010-03-09 17:20:15 UTC (rev 4748)
+++ trunk/ChangeLog	2010-03-10 00:55:21 UTC (rev 4749)
@@ -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,

Modified: trunk/src/build.c
===================================================================
--- trunk/src/build.c	2010-03-09 17:20:15 UTC (rev 4748)
+++ trunk/src/build.c	2010-03-10 00:55:21 UTC (rev 4749)
@@ -1859,7 +1859,7 @@
 	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"));

Modified: trunk/src/project.c
===================================================================
--- trunk/src/project.c	2010-03-09 17:20:15 UTC (rev 4748)
+++ trunk/src/project.c	2010-03-10 00:55:21 UTC (rev 4749)
@@ -401,7 +401,7 @@
 	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));


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.



More information about the Commits mailing list