babl: fix fix bpp initialization when loaded from cache
authorØyvind Kolås <pippin@gimp.org>
Thu, 27 Jan 2022 01:29:15 +0000 (02:29 +0100)
committerØyvind Kolås <pippin@gimp.org>
Thu, 27 Jan 2022 01:29:15 +0000 (02:29 +0100)
babl/babl-cache.c

index b48249a6609922b5e10226e06030812ff781c047..a3bd8e094c77f0f335b13dea032dd9d2a76560af 100644 (file)
@@ -347,7 +347,10 @@ babl_init_db (void)
               else if (!strncmp (token2, "cost=", 5))
               {
                 if (babl->class_type == BABL_FISH_PATH)
+                {
                   babl->fish_path.cost = babl_parse_double (token2 + 5);
+                  _babl_fish_prepare_bpp (babl);
+                }
               }
               else if (!strncmp (token2, "pixels=", 7))
               {
@@ -355,7 +358,6 @@ babl_init_db (void)
               }
               token2 = strtok_r (NULL, seps2, &tokp2);
             }
-            _babl_fish_prepare_bpp (babl);
           }
           else if (to_format && babl && babl->class_type == BABL_FISH_PATH)
           {