[anjuta] build-basic-autotools: Fix a crash added in the last changes when building a project without environ



commit 96d661ec29d7550535f77afc116645645ab5ce83
Author: SÃbastien Granjoux <seb sfo free fr>
Date:   Tue Aug 23 22:50:29 2011 +0200

    build-basic-autotools: Fix a crash added in the last changes when building a project without environment variables

 plugins/build-basic-autotools/build-options.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/plugins/build-basic-autotools/build-options.c b/plugins/build-basic-autotools/build-options.c
index 56352eb..a358364 100644
--- a/plugins/build-basic-autotools/build-options.c
+++ b/plugins/build-basic-autotools/build-options.c
@@ -377,7 +377,7 @@ build_dialog_configure (GtkWindow* parent, const gchar *project_root_uri, BuildC
 		g_free (uri);
 
 		mod_var = anjuta_environment_editor_get_modified_variables (ANJUTA_ENVIRONMENT_EDITOR (dlg.env_editor));
-		if (mod_var != NULL)
+		if ((mod_var != NULL) && (*mod_var != NULL))
 		{
 			gchar **var;
 			/* Invert list */
@@ -388,8 +388,8 @@ build_dialog_configure (GtkWindow* parent, const gchar *project_root_uri, BuildC
 				build_configuration_set_variable (cfg, *var);
 			}
 			while (var != mod_var);
-			g_strfreev (mod_var);
 		}
+		g_strfreev (mod_var);
 	}
 	gtk_widget_destroy (GTK_WIDGET(dlg.win));
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]