[gegl] raw-load: avoid warning instances of g_clear_pointer
- From: Øyvind "pippin" Kolås <ok src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gegl] raw-load: avoid warning instances of g_clear_pointer
- Date: Mon, 24 Sep 2018 13:02:24 +0000 (UTC)
commit b96b515c8c12590a5aa4c332ea64bdae49de9387
Author: Øyvind Kolås <pippin gimp org>
Date: Mon Sep 24 15:01:49 2018 +0200
raw-load: avoid warning instances of g_clear_pointer
operations/external/raw-load.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/operations/external/raw-load.c b/operations/external/raw-load.c
index 4b942c8a6..13eb661c2 100644
--- a/operations/external/raw-load.c
+++ b/operations/external/raw-load.c
@@ -80,8 +80,12 @@ raw_close (GeglProperties *o)
Private *p = (Private*)o->user_data;
g_clear_pointer (&p->cached_path, g_free);
- g_clear_pointer (&p->image, (GDestroyNotify) libraw_dcraw_clear_mem);
- g_clear_pointer (&p->LibRaw, (GDestroyNotify) libraw_close);
+ if (p->image)
+ libraw_dcraw_clear_mem (p->image);
+ if (p->LibRaw)
+ libraw_close (p->LibRaw);
+ p->image = NULL;
+ p->LibRaw = NULL;
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]