[gegl] gegl_color_get_rgba: check for NULL in pointer args
- From: Øyvind Kolås <ok src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gegl] gegl_color_get_rgba: check for NULL in pointer args
- Date: Tue, 29 Mar 2016 16:47:12 +0000 (UTC)
commit 305067386d51dcf2c17d6e9de36bf5a679b87980
Author: Øyvind Kolås <pippin gimp org>
Date: Tue Mar 29 18:46:23 2016 +0200
gegl_color_get_rgba: check for NULL in pointer args
gegl/property-types/gegl-color.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/gegl/property-types/gegl-color.c b/gegl/property-types/gegl-color.c
index a362926..6880136 100644
--- a/gegl/property-types/gegl-color.c
+++ b/gegl/property-types/gegl-color.c
@@ -310,10 +310,10 @@ gegl_color_get_rgba (GeglColor *self,
{
g_return_if_fail (GEGL_IS_COLOR (self));
- *r = self->priv->rgba_color[0];
- *g = self->priv->rgba_color[1];
- *b = self->priv->rgba_color[2];
- *a = self->priv->rgba_color[3];
+ if (r) *r = self->priv->rgba_color[0];
+ if (g) *g = self->priv->rgba_color[1];
+ if (b) *b = self->priv->rgba_color[2];
+ if (a) *a = self->priv->rgba_color[3];
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]