summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sci-electronics/ktechlab/files/ktechlab-0.50.0-crashfix.patch')
-rw-r--r--sci-electronics/ktechlab/files/ktechlab-0.50.0-crashfix.patch26
1 files changed, 26 insertions, 0 deletions
diff --git a/sci-electronics/ktechlab/files/ktechlab-0.50.0-crashfix.patch b/sci-electronics/ktechlab/files/ktechlab-0.50.0-crashfix.patch
new file mode 100644
index 00000000000..c72fdd60021
--- /dev/null
+++ b/sci-electronics/ktechlab/files/ktechlab-0.50.0-crashfix.patch
@@ -0,0 +1,26 @@
+From e0bb9ff940f6eda544342c499998cf6142258629 Mon Sep 17 00:00:00 2001
+From: "Martin T. H. Sandsmark" <martin.sandsmark@kde.org>
+Date: Sun, 20 Dec 2020 14:43:31 +0100
+Subject: [PATCH] fix odd crash
+
+---
+ src/nodegroup.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/nodegroup.cpp b/src/nodegroup.cpp
+index f4cfa2b4..94430409 100644
+--- a/src/nodegroup.cpp
++++ b/src/nodegroup.cpp
+@@ -142,8 +142,7 @@ void NodeGroup::updateRoutes()
+ Node *next = (routeIt == routeEnd) ? n2 : (Node *)*(routeIt++);
+ removeRoutedNodes(&currentList, prev, next);
+ QPointList pointList = *it;
+- if ( prev != n1 )
+- {
++ if (!pointList.isEmpty() && prev != n1) {
+ QPoint first = pointList.first();
+ prev->moveBy( first.x() - prev->x(), first.y() - prev->y() );
+ }
+--
+GitLab
+