From 39e19ee52fbaf11a2be71eac21ce3e366ebfef82 Mon Sep 17 00:00:00 2001 From: Ingo Date: Tue, 12 May 2015 13:20:42 +0200 Subject: [PATCH] Segfault when moving control points of parametric curves, Issue 590#10 --- rtgui/shcselector.cc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/rtgui/shcselector.cc b/rtgui/shcselector.cc index ef018e246..6b59db316 100644 --- a/rtgui/shcselector.cc +++ b/rtgui/shcselector.cc @@ -19,7 +19,6 @@ #include "shcselector.h" #include "multilangmgr.h" -#include #include "mycurve.h" SHCSelector::SHCSelector() : ColoredBar(RTO_Left2Right), movingPosition(-1), cl(NULL) { @@ -213,11 +212,11 @@ bool SHCSelector::on_motion_notify_event (GdkEventMotion* event) { positions[movingPosition] = tmpPos + (event->x - tmpX) / w; if (positions[movingPosition] < 0) positions[movingPosition] = 0.0; - else if (movingPosition > 0 && positions[movingPosition] < positions[movingPosition-1]+wslider/w) + if (movingPosition > 0 && positions[movingPosition] < positions[movingPosition-1]+wslider/w) positions[movingPosition] = positions[movingPosition-1]+wslider/w; if (positions[movingPosition] > 1.0) positions[movingPosition] = 1.0; - else if (movingPosition < 2 && positions[movingPosition] > positions[movingPosition+1]-wslider/w) + if (movingPosition < 2 && positions[movingPosition] > positions[movingPosition+1]-wslider/w) positions[movingPosition] = positions[movingPosition+1]-wslider/w; if (cl)