diff options
author | Claudio Saavedra <csaavedra@igalia.com> | 2010-05-05 15:28:03 +0300 |
---|---|---|
committer | Claudio Saavedra <csaavedra@igalia.com> | 2010-05-05 15:28:19 +0300 |
commit | 8aad2e064c33bebb82d705456e058f5494f549ff (patch) | |
tree | 2d7fe84db1fd4df70e6ea6d9620ce2682ec710be | |
parent | b1cf0af7bf2d317d87f6e5c8ccaf3464a5e25ae0 (diff) |
Fix another critical warning
Fixes: NB#162288 (Changing the presence continously will lead to
multiple GLIB Criticals in syslog)
-rw-r--r-- | hildon/hildon-live-search.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/hildon/hildon-live-search.c b/hildon/hildon-live-search.c index acdf4ed..933afec 100644 --- a/hildon/hildon-live-search.c +++ b/hildon/hildon-live-search.c @@ -330,6 +330,11 @@ refilter (HildonLiveSearch *livesearch) gtk_tree_selection_get_mode (gtk_tree_view_get_selection ( GTK_TREE_VIEW (priv->kb_focus_widget))) != GTK_SELECTION_NONE; + /* This is not pretty code, but it should fix some warnings in the case we + attempt to refilter before the treeview actually has a model. */ + if (needs_mapping && !gtk_tree_view_get_model (GTK_TREE_VIEW (priv->kb_focus_widget))) + return; + /* Create/update selection map from current selection */ if (needs_mapping) { if (priv->selection_map == NULL) |