We missed this in 81bf4c2 (isl_schedule_get_band_forest: sort bands
in band list, Tue Feb 26 12:35:16 2013 +0100).
Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
*
* If there is only one element in the list, then there is no need to sort
* anything.
- * If partial schedule of the parent has more than one member, then it's
+ * If the partial schedule of the parent has more than one member
+ * (or if there is no parent), then it's
* defnitely not assigning constant values to the different children in
* the list and so we wouldn't be able to use it to sort the list.
*/
return NULL;
if (list->n <= 1)
return list;
- if (parent->n != 1)
+ if (!parent || parent->n != 1)
return list;
data.r = 0;