[anjuta] project-manager: Fix a crash when the project view is empty
- From: Sebastien Granjoux <sgranjoux src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [anjuta] project-manager: Fix a crash when the project view is empty
- Date: Sun, 19 Dec 2010 21:48:15 +0000 (UTC)
commit 2bbf14aecb71d6ac84d3e6a897d8b880701c7f62
Author: Sébastien Granjoux <seb sfo free fr>
Date: Sun Dec 19 17:50:19 2010 +0100
project-manager: Fix a crash when the project view is empty
plugins/project-manager/plugin.c | 2 +-
plugins/project-manager/project-view.c | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/plugins/project-manager/plugin.c b/plugins/project-manager/plugin.c
index a8a758d..5cfdd1e 100644
--- a/plugins/project-manager/plugin.c
+++ b/plugins/project-manager/plugin.c
@@ -1280,7 +1280,7 @@ on_project_loaded (AnjutaPmProject *project, GtkTreeIter *parent, gboolean compl
{
AnjutaStatus *status;
gchar *dirname;
-
+
dirname = anjuta_util_get_local_path_from_uri (plugin->project_root_uri);
status = anjuta_shell_get_status (ANJUTA_PLUGIN (plugin)->shell, NULL);
if (error)
diff --git a/plugins/project-manager/project-view.c b/plugins/project-manager/project-view.c
index 9f5ae9a..858f207 100644
--- a/plugins/project-manager/project-view.c
+++ b/plugins/project-manager/project-view.c
@@ -1303,13 +1303,13 @@ on_node_loaded (AnjutaPmProject *sender, AnjutaProjectNode *node, gboolean compl
gbf_project_view_update_tree (view, node, found ? &iter : NULL);
if (!found)
{
- gtk_tree_model_get_iter_first (GTK_TREE_MODEL (view->model), &iter);
+ found = !gtk_tree_model_get_iter_first (GTK_TREE_MODEL (view->model), &iter);
}
gtk_tree_sortable_set_sort_column_id (GTK_TREE_SORTABLE (view->model),
GTK_TREE_SORTABLE_DEFAULT_SORT_COLUMN_ID,
GTK_SORT_ASCENDING);
- g_signal_emit (G_OBJECT (view), signals[NODE_LOADED], 0, &iter, complete, NULL);
+ g_signal_emit (G_OBJECT (view), signals[NODE_LOADED], 0, found ? &iter : NULL, complete, NULL);
}
if (complete)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]