Skip to content

Commit 41a0df5

Browse files
committed
Don't hold the CoreSuspend over INTERPOSE_NEXT
1 parent e8763fe commit 41a0df5

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

plugins/building-hacks.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -290,9 +290,11 @@ struct work_hook : df::building_workshopst{
290290
}
291291
DEFINE_VMETHOD_INTERPOSE(void, setTriggerState,(int32_t state))
292292
{
293-
CoreSuspendClaimer suspend;
294-
color_ostream_proxy out(Core::getInstance().getConsole());
295-
onSetTriggerState(out, this,state);
293+
{
294+
CoreSuspender suspend;
295+
color_ostream_proxy out(Core::getInstance().getConsole());
296+
onSetTriggerState(out, this, state);
297+
}
296298
INTERPOSE_NEXT(setTriggerState)(state); //pretty sure default workshop has nothing related to this, but to be future proof lets do it like this
297299
}
298300
DEFINE_VMETHOD_INTERPOSE(void, drawBuilding, (uint32_t curtick,df::building_drawbuffer *db, int16_t z_offset))

0 commit comments

Comments
 (0)