Commit a118f44a authored by Christian Hergert's avatar Christian Hergert

iterator: improve GListModel check

We cannot rely on the specified type in the GValue, but instead
the type of the object contained.
parent e240603d
......@@ -110,7 +110,8 @@ tmpl_iterator_init (TmplIterator *iter,
iter->get_value = string_get_value;
iter->destroy = NULL;
}
else if (G_VALUE_HOLDS (value, G_TYPE_LIST_MODEL))
else if (G_VALUE_HOLDS (value, G_TYPE_OBJECT) &&
G_IS_LIST_MODEL (g_value_get_object (value)))
{
iter->instance = g_value_get_object (value);
iter->move_next = list_model_move_next;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment