[libpeas] [PeasUIPluginManager] Correctly check that an iterator was set
- From: Garrett Regier <gregier src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libpeas] [PeasUIPluginManager] Correctly check that an iterator was set
- Date: Mon, 12 Jul 2010 13:55:21 +0000 (UTC)
commit c20ed612e86e0be452ee618edd43d29293014371
Author: Garrett Regier <alias301 gmail com>
Date: Wed Jul 7 16:42:15 2010 -0700
[PeasUIPluginManager] Correctly check that an iterator was set
libpeasui/peas-ui-plugin-manager.c | 10 +++-------
1 files changed, 3 insertions(+), 7 deletions(-)
---
diff --git a/libpeasui/peas-ui-plugin-manager.c b/libpeasui/peas-ui-plugin-manager.c
index 7abc273..9232a91 100644
--- a/libpeasui/peas-ui-plugin-manager.c
+++ b/libpeasui/peas-ui-plugin-manager.c
@@ -314,9 +314,7 @@ active_toggled_cb (GtkCellRendererToggle *cell,
model = gtk_tree_view_get_model (GTK_TREE_VIEW (pm->priv->tree));
g_return_if_fail (model != NULL);
- gtk_tree_model_get_iter (model, &iter, path);
-
- if (&iter != NULL)
+ if (gtk_tree_model_get_iter (model, &iter, path))
plugin_manager_toggle_active (pm, &iter, model);
gtk_tree_path_free (path);
@@ -348,10 +346,8 @@ row_activated_cb (GtkTreeView *tree_view,
model = gtk_tree_view_get_model (GTK_TREE_VIEW (pm->priv->tree));
g_return_if_fail (model != NULL);
- gtk_tree_model_get_iter (model, &iter, path);
- g_return_if_fail (&iter != NULL);
-
- plugin_manager_toggle_active (pm, &iter, model);
+ if (gtk_tree_model_get_iter (model, &iter, path))
+ plugin_manager_toggle_active (pm, &iter, model);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]