remotefortressreader: Check map validity before reading map info

Fixes JapaMala/armok-vision#5
develop
lethosor 2015-08-06 13:42:13 -04:00
parent 090f542d49
commit 44287fc3a0
2 changed files with 3 additions and 0 deletions

@ -37,6 +37,7 @@ DFHack Future
- made "esc" work properly
gui/gm-editor handles lua tables properly
manipulator: fixed crash when selecting custom professions when none are found
remotefortressreader: fixed crash when attempting to send map info when no map was loaded
search: fixed crash in unit list after cancelling a job
stockpiles: now checks/sanitizes filenames when saving
stocks: fixed a crash when right-clicking

@ -931,6 +931,8 @@ static command_result GetViewInfo(color_ostream &stream, const EmptyMessage *in,
static command_result GetMapInfo(color_ostream &stream, const EmptyMessage *in, MapInfo *out)
{
if (!Maps::IsValid())
return CR_FAILURE;
uint32_t size_x, size_y, size_z;
int32_t pos_x, pos_y, pos_z;
Maps::getSize(size_x, size_y, size_z);