ges-group: Properly check for integer underflows
authorSebastian Dröge <sebastian@centricular.com>
Sat, 8 Feb 2014 19:19:53 +0000 (20:19 +0100)
committerSebastian Dröge <sebastian@centricular.com>
Sat, 8 Feb 2014 19:19:53 +0000 (20:19 +0100)
error: comparison of unsigned expression < 0 is always false

ges/ges-group.c

index 5bbc6cb..f30b9c9 100644 (file)
@@ -162,7 +162,7 @@ _child_group_priority_changed (GESTimelineElement * child,
 
   offset = _ges_container_get_priority_offset (container, child);
 
-  if (_PRIORITY (group) + offset < 0 ||
+  if (_PRIORITY (group) < offset ||
       (GES_TIMELINE_ELEMENT_TIMELINE (group) &&
           _PRIORITY (group) + offset + GES_CONTAINER_HEIGHT (group) >
           g_list_length (GES_TIMELINE_ELEMENT_TIMELINE (group)->layers))) {