[gegl] gegl: gegl_path_get_bounds handle NULL args
- From: Øyvind "pippin" Kolås <ok src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gegl] gegl: gegl_path_get_bounds handle NULL args
- Date: Fri, 24 May 2019 11:57:08 +0000 (UTC)
commit 4e14a7c0aeac4d531b010354fde80dd4ea610182
Author: Øyvind Kolås <pippin gimp org>
Date: Tue May 21 01:40:08 2019 +0200
gegl: gegl_path_get_bounds handle NULL args
gegl/property-types/gegl-path.c | 7 +++++++
1 file changed, 7 insertions(+)
---
diff --git a/gegl/property-types/gegl-path.c b/gegl/property-types/gegl-path.c
index 9fe4edc64..d28d1f87f 100644
--- a/gegl/property-types/gegl-path.c
+++ b/gegl/property-types/gegl-path.c
@@ -577,10 +577,17 @@ gegl_path_get_bounds (GeglPath *self,
gdouble *min_y,
gdouble *max_y)
{
+ gdouble dummy;
GeglPathPrivate *priv;
GeglPathList *iter;
gboolean first_point = TRUE;
+ /* protecting against NULL arguments */
+ if (!min_x) min_x = &dummy;
+ if (!max_x) max_x = &dummy;
+ if (!min_y) min_y = &dummy;
+ if (!max_y) max_y = &dummy;
+
*min_x = 0.0;
*min_y = 0.0;
*max_x = 0.0;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]