summaryrefslogtreecommitdiff
path: root/plugins/cleaners.cpp
diff options
context:
space:
mode:
authorAlexander Gavrilov2012-01-24 15:36:30 +0400
committerAlexander Gavrilov2012-01-24 15:36:30 +0400
commit174d9d0739d7a0afc6b889eafc154b8b446dc932 (patch)
tree6db67dd3f4a736ab443db178de48177e3e6dd0ce /plugins/cleaners.cpp
parent6adadb396eacbb2a631f796449fcbf35503168d2 (diff)
downloaddfhack-174d9d0739d7a0afc6b889eafc154b8b446dc932.tar.gz
dfhack-174d9d0739d7a0afc6b889eafc154b8b446dc932.tar.bz2
dfhack-174d9d0739d7a0afc6b889eafc154b8b446dc932.tar.xz
Tweak showmood, add a few validity checks, commit a dfhack.init example.
Diffstat (limited to 'plugins/cleaners.cpp')
-rw-r--r--plugins/cleaners.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/plugins/cleaners.cpp b/plugins/cleaners.cpp
index f8a5ba59..2ba87717 100644
--- a/plugins/cleaners.cpp
+++ b/plugins/cleaners.cpp
@@ -122,6 +122,11 @@ DFhackCExport command_result spotclean (Core * c, vector <string> & parameters)
c->con.printerr("The cursor is not active.\n");
return CR_WRONG_USAGE;
}
+ if (!Maps::IsValid())
+ {
+ c->con.printerr("Map is not available.\n");
+ return CR_FAILURE;
+ }
df::map_block *block = Maps::getBlockAbs(cursor->x, cursor->y, cursor->z);
if (block == NULL)
{