diff options
| author | Quietust | 2012-05-23 13:43:41 -0500 |
|---|---|---|
| committer | Quietust | 2012-05-23 13:43:41 -0500 |
| commit | ae41ddc04a2b3a076bd18af984f163e46c74b65f (patch) | |
| tree | 6c98e82f33545e806b5a3bc0d5f69a234b2acb91 /plugins/autolabor.cpp | |
| parent | 2b862655b722234431051f188fe5169960bb3f05 (diff) | |
| download | dfhack-ae41ddc04a2b3a076bd18af984f163e46c74b65f.tar.gz dfhack-ae41ddc04a2b3a076bd18af984f163e46c74b65f.tar.bz2 dfhack-ae41ddc04a2b3a076bd18af984f163e46c74b65f.tar.xz | |
Don't crash if world is undefined
Diffstat (limited to 'plugins/autolabor.cpp')
| -rw-r--r-- | plugins/autolabor.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/autolabor.cpp b/plugins/autolabor.cpp index d89ddd7c..de1a1aef 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; |
