summaryrefslogtreecommitdiffhomepage
path: root/qfunctionconfigurator/qfunctionconfigurator.cpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2013-11-05 08:59:40 +0100
committerStanislaw Halik <sthalik@misaki.pl>2013-11-05 08:59:40 +0100
commitef0d7dcf585a7a6b807d2a287dfbdc59657a30cc (patch)
tree8f810b3f7d57060769fa4407af3821553f4f0303 /qfunctionconfigurator/qfunctionconfigurator.cpp
parent5e022e6d9117bfcaa24dc0ffaafed78031bcd1a7 (diff)
fix potential crash
Signed-off-by: Stanislaw Halik <sthalik@misaki.pl>
Diffstat (limited to 'qfunctionconfigurator/qfunctionconfigurator.cpp')
-rw-r--r--qfunctionconfigurator/qfunctionconfigurator.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/qfunctionconfigurator/qfunctionconfigurator.cpp b/qfunctionconfigurator/qfunctionconfigurator.cpp
index afd6561b..a80e3b6b 100644
--- a/qfunctionconfigurator/qfunctionconfigurator.cpp
+++ b/qfunctionconfigurator/qfunctionconfigurator.cpp
@@ -337,6 +337,8 @@ void QFunctionConfigurator::drawLine(QPainter *painter, const QPointF &start, co
//
void QFunctionConfigurator::mousePressEvent(QMouseEvent *e)
{
+ if (!_config)
+ return;
QList<QPointF> points = _config->getPoints();
//
@@ -409,6 +411,8 @@ void QFunctionConfigurator::mousePressEvent(QMouseEvent *e)
//
void QFunctionConfigurator::mouseMoveEvent(QMouseEvent *e)
{
+ if (!_config)
+ return;
QList<QPointF> points = _config->getPoints();
const int refresh_delay = 50;
@@ -452,6 +456,8 @@ void QFunctionConfigurator::mouseMoveEvent(QMouseEvent *e)
void QFunctionConfigurator::mouseReleaseEvent(QMouseEvent *e)
{
+ if (!_config)
+ return;
QList<QPointF> points = _config->getPoints();
if (e->button() == Qt::LeftButton) {