Fix a crash when editing a special node.

This commit is contained in:
2025-03-10 22:48:23 -04:00
committed by Celtic Minstrel
parent bcf8bf963e
commit c73cb6220b

View File

@@ -1367,7 +1367,7 @@ bool edit_spec_enc(short which_node,short mode,cDialog* parent) {
"sdf1-toggle", "sdf2-toggle",
});
special.attachFocusHandlers([&edit_stack](cDialog& me, std::string, bool losing) {
if(losing) {
if(losing && !edit_stack.empty()) {
save_spec_enc(me, edit_stack);
put_spec_enc_in_dlog(me, edit_stack);
}