Do not de-reference a void*; use a temporary variable -- after
checking the contents of the pointer. This actually simplifies
the readability and avoids pulling a Lisp with the parentheses.
list_try_get_rel (GList *list,
gint count)
{
+ ClutterAnimatorKey *key;
GList *iter = list;
GList *best = list;
}
}
- return g_value_get_float (&(((ClutterAnimatorKey *)best->data)->value));
+ if (best != NULL && best->data != NULL)
+ {
+ key = best->data;
+
+ return g_value_get_float (&(key->value));
+ }
+
+ return 0;
}
static void