babl-fish: handle case of no from_list in source
authorØyvind Kolås <pippin@gimp.org>
Thu, 30 Aug 2018 00:01:18 +0000 (02:01 +0200)
committerØyvind Kolås <pippin@gimp.org>
Thu, 30 Aug 2018 00:01:18 +0000 (02:01 +0200)
babl/babl-fish.c

index 0976de6160d918a48029b863670f4bee0d32180f..a5306550b07150dd8c55d4dc873c0e55024455c2 100644 (file)
@@ -120,7 +120,8 @@ babl_conversion_find (const void *source,
 {
   void *data = (void*)destination;
 
-  babl_list_each (BABL (source)->type.from_list, match_conversion, &data);
+  if (BABL (source)->type.from_list)
+    babl_list_each (BABL (source)->type.from_list, match_conversion, &data);
   if (data != (void*)destination) /* didn't change */
     return data;
   data = NULL;