diff --git a/plugins/autolabor.cpp b/plugins/autolabor.cpp index d89ddd7c6..de1a1aef6 100644 --- a/plugins/autolabor.cpp +++ b/plugins/autolabor.cpp @@ -706,7 +706,7 @@ DFhackCExport command_result plugin_onupdate ( color_ostream &out ) { static int step_count = 0; // check run conditions - if(!world->map.block_index || !enable_autolabor) + if(!world || !world->map.block_index || !enable_autolabor) { // give up if we shouldn't be running' return CR_OK; diff --git a/plugins/fastdwarf.cpp b/plugins/fastdwarf.cpp index 643a097c4..5a2e2f206 100644 --- a/plugins/fastdwarf.cpp +++ b/plugins/fastdwarf.cpp @@ -28,7 +28,7 @@ static int enable_fastdwarf = false; DFhackCExport command_result plugin_onupdate ( color_ostream &out ) { // check run conditions - if(!world->map.block_index || !enable_fastdwarf) + if(!world || !world->map.block_index || !enable_fastdwarf) { // give up if we shouldn't be running' return CR_OK;