diff options
author | Alberto Garcia <agarcia@igalia.com> | 2009-11-11 12:59:11 +0100 |
---|---|---|
committer | Claudio Saavedra <csaavedra@igalia.com> | 2009-11-16 09:53:12 +0200 |
commit | d62fdcecf7551c2e0dd107b667e16197a3fae844 (patch) | |
tree | 07057cc3a08f2e428843c068597fcb65e6e92390 /hildon/hildon-live-search.c | |
parent | e45bcf6ef62d5dea41a826fe2fb8e8f2b84495b6 (diff) |
Better check for parameters in the HildonLiveSearch public API
Diffstat (limited to 'hildon/hildon-live-search.c')
-rw-r--r-- | hildon/hildon-live-search.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/hildon/hildon-live-search.c b/hildon/hildon-live-search.c index 60a64d1..9dc395a 100644 --- a/hildon/hildon-live-search.c +++ b/hildon/hildon-live-search.c @@ -689,10 +689,12 @@ hildon_live_search_set_text_column (HildonLiveSearch *livesearch, gint text_column) { HildonLiveSearchPrivate *priv; - priv = livesearch->priv; g_return_if_fail (HILDON_IS_LIVE_SEARCH (livesearch)); g_return_if_fail (-1 <= text_column); + + priv = livesearch->priv; + g_return_if_fail (text_column < gtk_tree_model_get_n_columns (gtk_tree_model_filter_get_model (priv->filter))); g_return_if_fail (priv->visible_func == NULL); @@ -732,6 +734,9 @@ hildon_live_search_widget_hook (HildonLiveSearch *livesearch, HildonLiveSearchPrivate *priv; g_return_if_fail (HILDON_IS_LIVE_SEARCH (livesearch)); + g_return_if_fail (GTK_IS_WIDGET (hook_widget)); + g_return_if_fail (GTK_IS_TREE_VIEW (kb_focus)); + priv = livesearch->priv; g_return_if_fail (priv->event_widget == NULL); |