[gimp] app: allow passing NULL pointers to gimp_tool_polygon_get_points()
- From: Ell <ell src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: allow passing NULL pointers to gimp_tool_polygon_get_points()
- Date: Thu, 25 Apr 2019 10:08:50 +0000 (UTC)
commit e8c915af939ce8ac5697975b99f7d2e74faf4a6d
Author: Ell <ell_se yahoo com>
Date: Thu Apr 25 04:24:07 2019 -0400
app: allow passing NULL pointers to gimp_tool_polygon_get_points()
app/display/gimptoolpolygon.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
---
diff --git a/app/display/gimptoolpolygon.c b/app/display/gimptoolpolygon.c
index e85c1b9a03..0be68e866e 100644
--- a/app/display/gimptoolpolygon.c
+++ b/app/display/gimptoolpolygon.c
@@ -1437,10 +1437,12 @@ gimp_tool_polygon_get_points (GimpToolPolygon *polygon,
const GimpVector2 **points,
gint *n_points)
{
- GimpToolPolygonPrivate *private = polygon->private;
+ GimpToolPolygonPrivate *private;
+
+ g_return_if_fail (GIMP_IS_TOOL_POLYGON (polygon));
- g_return_if_fail (points != NULL && n_points != NULL);
+ private = polygon->private;
- *points = private->points;
- *n_points = private->n_points;
+ if (points) *points = private->points;
+ if (n_points) *n_points = private->n_points;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]