[babl] babl: skip unknown formats when loading cache
- From: Øyvind Kolås <ok src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [babl] babl: skip unknown formats when loading cache
- Date: Wed, 13 Sep 2017 16:09:11 +0000 (UTC)
commit 2315da9ba0ec2b7dbd21c676051559775ad48ee9
Author: Øyvind Kolås <pippin gimp org>
Date: Wed Sep 13 18:04:49 2017 +0200
babl: skip unknown formats when loading cache
Fixes bug #787467.
Formats based on custom primaries provided by applications are unknown to babl
at launch, we still want to keep the data though, since this list of most used
fishes first is useful resource in combination with the warnings about missing
fast paths.
babl/babl-cache.c | 8 ++------
1 files changed, 2 insertions(+), 6 deletions(-)
---
diff --git a/babl/babl-cache.c b/babl/babl-cache.c
index 0200a11..fa3f387 100644
--- a/babl/babl-cache.c
+++ b/babl/babl-cache.c
@@ -257,7 +257,7 @@ void babl_init_db (void)
}
break;
case '\t':
- if (strchr (token, '='))
+ if (to_format && strchr (token, '='))
{
char seps2[] = " ";
char *tokp2;
@@ -307,7 +307,7 @@ void babl_init_db (void)
token2 = strtok_r (NULL, seps2, &tokp2);
}
}
- else
+ else if (to_format)
{
Babl *conv = (void*)babl_db_find(babl_conversion_db(), &token[1]);
if (!conv)
@@ -322,14 +322,10 @@ void babl_init_db (void)
if (!from_format)
{
from_format = (void*)babl_db_find(babl_format_db(), token);
- if (!from_format)
- return;
}
else
{
to_format = (void*)babl_db_find(babl_format_db(), token);
- if (!to_format)
- return;
}
break;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]