[babl] babl: always intialize encoding pointer during format construction
- From: Øyvind "pippin" Kolås <ok src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [babl] babl: always intialize encoding pointer during format construction
- Date: Thu, 30 May 2019 16:00:59 +0000 (UTC)
commit d1b1ba7ac66455c3de14b685d309620334d47b71
Author: Øyvind Kolås <pippin gimp org>
Date: Thu May 30 17:50:10 2019 +0200
babl: always intialize encoding pointer during format construction
This fixes issue #35, we initialize with NULL which will cause
babl_format_get_encoding to itself call babl_get_name rather.
babl/babl-format.c | 1 +
1 file changed, 1 insertion(+)
---
diff --git a/babl/babl-format.c b/babl/babl-format.c
index 5784196..accc15a 100644
--- a/babl/babl-format.c
+++ b/babl/babl-format.c
@@ -127,6 +127,7 @@ format_new (const char *name,
babl->format.palette = 0;
babl->format.space = (void*)space;
+ babl->format.encoding = NULL;
return babl;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]