diff --git a/src/simulation/elements/STKM.cpp b/src/simulation/elements/STKM.cpp index eed884c71..316291876 100644 --- a/src/simulation/elements/STKM.cpp +++ b/src/simulation/elements/STKM.cpp @@ -78,7 +78,8 @@ int Element_STKM::run_stickman(playerst *playerp, UPDATE_FUNC_ARGS) { float rocketBootsHeadEffectV = 0.3f;// stronger acceleration vertically, to counteract gravity float rocketBootsFeetEffectV = 0.45f; - STKM_set_element(sim, playerp, parts[i].ctype); + if (parts[i].ctype && sim->IsValidElement(parts[i].ctype)) + STKM_set_element(sim, playerp, parts[i].ctype); playerp->frames++; //Temperature handling