gegl r2627 - in trunk: . gegl/property-types
- From: ok svn gnome org
- To: svn-commits-list gnome org
- Subject: gegl r2627 - in trunk: . gegl/property-types
- Date: Wed, 15 Oct 2008 00:18:22 +0000 (UTC)
Author: ok
Date: Wed Oct 15 00:18:22 2008
New Revision: 2627
URL: http://svn.gnome.org/viewvc/gegl?rev=2627&view=rev
Log:
* gegl/property-types/gegl-vector.c: (gegl_vector_fill),
(gegl_vector_stroke), (gegl_vector_get_length),
(gegl_vector_get_bounds), (gegl_vector_calc),
(gegl_vector_calc_values): bail out on NULL vector arguments.
Modified:
trunk/ChangeLog
trunk/gegl/property-types/gegl-vector.c
Modified: trunk/gegl/property-types/gegl-vector.c
==============================================================================
--- trunk/gegl/property-types/gegl-vector.c (original)
+++ trunk/gegl/property-types/gegl-vector.c Wed Oct 15 00:18:22 2008
@@ -700,6 +700,9 @@
gfloat versub = versubi;
gint samples;
+ if (!vector)
+ return;
+
ensure_flattened (vector);
samples = path_get_length (priv->flat_path);
gegl_vector_get_bounds (vector, &xmin, &xmax, &ymin, &ymax);
@@ -944,6 +947,9 @@
gdouble xmin, xmax, ymin, ymax;
GeglRectangle extent;
+ if (!vector)
+ return;
+
ensure_flattened (vector);
iter = priv->flat_path;
@@ -1270,6 +1276,8 @@
gegl_vector_get_length (GeglVector *self)
{
GeglVectorPrivate *priv = GEGL_VECTOR_GET_PRIVATE (self);
+ if (!self)
+ return 0.0;
ensure_flattened (self);
return path_get_length (priv->flat_path);
}
@@ -1280,14 +1288,20 @@
gdouble *min_y,
gdouble *max_y)
{
- GeglVectorPrivate *priv = GEGL_VECTOR_GET_PRIVATE (self);
+ GeglVectorPrivate *priv;
Path *iter;
-
+
*min_x = 256.0;
*min_y = 256.0;
*max_x = -256.0;
*max_y = -256.0;
+ if (!self)
+ return;
+
+ priv = GEGL_VECTOR_GET_PRIVATE (self);
+
+
ensure_flattened (self);
iter = priv->flat_path;
@@ -1332,6 +1346,8 @@
gdouble *yd)
{
GeglVectorPrivate *priv = GEGL_VECTOR_GET_PRIVATE (self);
+ if (!self)
+ return;
ensure_flattened (self);
return path_calc (priv->flat_path, pos, xd, yd);
}
@@ -1344,6 +1360,8 @@
gdouble *ys)
{
GeglVectorPrivate *priv = GEGL_VECTOR_GET_PRIVATE (self);
+ if (!self)
+ return;
ensure_flattened (self);
return path_calc_values (priv->flat_path, num_samples, xs, ys);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]