summaryrefslogtreecommitdiffstats
path: root/src/widgets/gradient-vector.cpp
diff options
context:
space:
mode:
authorTavmjong Bah <tavmjong@free.fr>2015-10-14 11:20:09 +0000
committertavmjong-free <tavmjong@free.fr>2015-10-14 11:20:09 +0000
commitbdf7f8acb13e3c1920307674e3fea3cbca8ba12e (patch)
treea5da8a74ecdc174463e3cc7bf62a326b51e240a0 /src/widgets/gradient-vector.cpp
parentAdded a parameter to roughen LPE to allow fixed displacement of points (diff)
downloadinkscape-bdf7f8acb13e3c1920307674e3fea3cbca8ba12e.tar.gz
inkscape-bdf7f8acb13e3c1920307674e3fea3cbca8ba12e.zip
Fix from Johan to prevent referencing null C++ pointer. Found via Clang scan build.
(bzr r14409)
Diffstat (limited to '')
-rw-r--r--src/widgets/gradient-vector.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/widgets/gradient-vector.cpp b/src/widgets/gradient-vector.cpp
index 259d4c9af..8e92f589a 100644
--- a/src/widgets/gradient-vector.cpp
+++ b/src/widgets/gradient-vector.cpp
@@ -842,7 +842,8 @@ static GtkWidget * sp_gradient_vector_widget_new(SPGradient *gradient, SPStop *s
GtkWidget *vb, *w, *f;
- g_return_val_if_fail(!gradient || SP_IS_GRADIENT(gradient), NULL);
+ g_return_val_if_fail(gradient != NULL, NULL);
+ g_return_val_if_fail(SP_IS_GRADIENT(gradient), NULL);
#if GTK_CHECK_VERSION(3,0,0)
vb = gtk_box_new(GTK_ORIENTATION_VERTICAL, PAD);