[libpeas] Fix crash when searching a plugin in the manager.
- From: Steve Frécinaux <sfre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libpeas] Fix crash when searching a plugin in the manager.
- Date: Sun, 6 Mar 2011 11:50:59 +0000 (UTC)
commit 4b147efeaba4b9e71402088836155aff3f8c55a6
Author: Steve Frécinaux <code istique net>
Date: Sun Mar 6 12:48:26 2011 +0100
Fix crash when searching a plugin in the manager.
When the show-builtins property is set to false, we need to convert the
original tree model iter to a filtered tree model iter before using it
or things will go wrong.
libpeas-gtk/peas-gtk-plugin-manager-view.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/libpeas-gtk/peas-gtk-plugin-manager-view.c b/libpeas-gtk/peas-gtk-plugin-manager-view.c
index a52b6e8..a3ad6bc 100644
--- a/libpeas-gtk/peas-gtk-plugin-manager-view.c
+++ b/libpeas-gtk/peas-gtk-plugin-manager-view.c
@@ -267,6 +267,7 @@ name_search_cb (GtkTreeModel *model,
GtkTreeIter *iter,
PeasGtkPluginManagerView *view)
{
+ GtkTreeIter child_iter = *iter;
PeasPluginInfo *info;
gchar *normalized_string;
gchar *normalized_key;
@@ -275,7 +276,8 @@ name_search_cb (GtkTreeModel *model,
gint key_len;
gboolean retval;
- info = peas_gtk_plugin_manager_store_get_plugin (view->priv->store, iter);
+ convert_iter_to_child_iter (view, &child_iter);
+ info = peas_gtk_plugin_manager_store_get_plugin (view->priv->store, &child_iter);
if (info == NULL)
return FALSE;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]