[nautilus] Initialize variables to NULL.
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus] Initialize variables to NULL.
- Date: Tue, 27 Apr 2010 14:40:56 +0000 (UTC)
commit 430d554f55632475dac94a7a9d6009c0f189b178
Author: Cosimo Cecchi <cosimoc gnome org>
Date: Tue Apr 27 16:36:38 2010 +0200
Initialize variables to NULL.
src/nautilus-places-sidebar.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/src/nautilus-places-sidebar.c b/src/nautilus-places-sidebar.c
index f520d01..561e8c2 100644
--- a/src/nautilus-places-sidebar.c
+++ b/src/nautilus-places-sidebar.c
@@ -299,7 +299,7 @@ update_places (NautilusPlacesSidebar *sidebar)
GtkTreeSelection *selection;
GtkTreeIter iter, last_iter;
GtkTreePath *select_path;
- GtkTreeModel *model = NULL;
+ GtkTreeModel *model;
GVolumeMonitor *volume_monitor;
GList *mounts, *l, *ll;
GMount *mount;
@@ -314,6 +314,10 @@ update_places (NautilusPlacesSidebar *sidebar)
NautilusWindowSlotInfo *slot;
char *tooltip;
+ model = NULL;
+ last_uri = NULL;
+ select_path = NULL;
+
selection = gtk_tree_view_get_selection (sidebar->tree_view);
if (gtk_tree_selection_get_selected (selection, &model, &last_iter)) {
gtk_tree_model_get (model,
@@ -321,7 +325,6 @@ update_places (NautilusPlacesSidebar *sidebar)
PLACES_SIDEBAR_COLUMN_URI, &last_uri, -1);
}
gtk_list_store_clear (sidebar->store);
- select_path = NULL;
slot = nautilus_window_info_get_active_slot (sidebar->window);
location = nautilus_window_slot_info_get_current_location (slot);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]