summaryrefslogtreecommitdiffhomepage
path: root/spline-widget
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2016-09-09 11:55:35 +0200
committerStanislaw Halik <sthalik@misaki.pl>2016-09-09 15:00:44 +0200
commitfae53796863321b53f02bfd1db967f6b1b13adc5 (patch)
tree8e20be5f76604a91f5e351289f9a2e24c3ed43a6 /spline-widget
parentb9cd3bb3f197df7d5b9d885230362549987f4c8f (diff)
spline-widget: fix uninitialized access
Found-by: valgrind
Diffstat (limited to 'spline-widget')
-rw-r--r--spline-widget/spline-widget.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/spline-widget/spline-widget.cpp b/spline-widget/spline-widget.cpp
index 0dc94555..472862fe 100644
--- a/spline-widget/spline-widget.cpp
+++ b/spline-widget/spline-widget.cpp
@@ -153,6 +153,7 @@ void spline_widget::drawFunction()
(
if (!isEnabled() && !_preview_only)
{
+ QColor color(spline_color);
const int avg = int(float(color.red() + color.green() + color.blue())/3);
return QColor(int(float(color.red() + avg) * .5f),
int(float(color.green() + avg) * .5f),