From 75034de5a40effc76bcec1ae5f1772ebf62ffd22 Mon Sep 17 00:00:00 2001 From: jacob1 Date: Sat, 12 Apr 2014 15:52:12 -0400 Subject: [PATCH] fix crash when SOAP gets changed into another element, fixes #186 --- src/simulation/Simulation.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/simulation/Simulation.cpp b/src/simulation/Simulation.cpp index c44e074bf..c3d97aa22 100644 --- a/src/simulation/Simulation.cpp +++ b/src/simulation/Simulation.cpp @@ -2827,7 +2827,7 @@ int Simulation::create_part(int p, int x, int y, int tv) } else if (parts[p].type == PT_SOAP) { - detach(i); + detach(p); } i = p; }