diff options
| author | Petr Mrázek | 2011-08-15 01:30:15 +0200 |
|---|---|---|
| committer | Petr Mrázek | 2011-08-15 01:30:15 +0200 |
| commit | 292074116eb949a8902b5d295a58e49c04291c9c (patch) | |
| tree | 8be95fd7fc292d4ce9a7e25c6768106e5a25896b /plugins/tiletypes.cpp | |
| parent | a0f99ef7079bb741dcfa44b7365e3b13f3ec9016 (diff) | |
| download | dfhack-292074116eb949a8902b5d295a58e49c04291c9c.tar.gz dfhack-292074116eb949a8902b5d295a58e49c04291c9c.tar.bz2 dfhack-292074116eb949a8902b5d295a58e49c04291c9c.tar.xz | |
Fix crash bugs in liquids and tiletypes.
Diffstat (limited to 'plugins/tiletypes.cpp')
| -rw-r--r-- | plugins/tiletypes.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/plugins/tiletypes.cpp b/plugins/tiletypes.cpp index 16094e0f..4f07736a 100644 --- a/plugins/tiletypes.cpp +++ b/plugins/tiletypes.cpp @@ -605,7 +605,9 @@ DFhackCExport command_result df_tiletypes (Core * c, vector <string> & parameter } int32_t type = DFHack::findTileType(shape, material, source->variant, special, source->direction); - map.setTiletypeAt(*iter, type); + // make sure it's not invalid + if(type != -1) + map.setTiletypeAt(*iter, type); // Remove liquid from walls, etc if (!DFHack::FlowPassable(shape)) |
