summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Jones <admin@danieljon.es>2020-06-24 15:51:52 +0930
committerDaniel Jones <admin@danieljon.es>2020-06-24 15:51:52 +0930
commit6b7015aad6cba1a2ea3a62891c8910d92c1a41e0 (patch)
tree87a309ba834c4bf212e9eb915708edc40a75bf31
parent08ffc71b3b219c169af385ed9c47fae6535dcd67 (diff)
downloadfoxlogicgates-6b7015aad6cba1a2ea3a62891c8910d92c1a41e0.tar.gz
foxlogicgates-6b7015aad6cba1a2ea3a62891c8910d92c1a41e0.zip
fixed crash when deleting link with invalid selected gate
-rw-r--r--MainWindow.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/MainWindow.cpp b/MainWindow.cpp
index 3010f19..23ca61c 100644
--- a/MainWindow.cpp
+++ b/MainWindow.cpp
@@ -458,6 +458,8 @@ MainWindow::on_left_mouse_down(FXObject*, FXSelector, void *ptr)
FXEvent *ev = (FXEvent*)ptr;
lmouse_down = true;
Gate *gate = nullptr;
+ selected_input.gate = nullptr;
+ selected_input.input = -1;
if (selected_gate_type != Gate::NONE)
{
/* add new gate */