summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPetr Mrázek2012-09-29 01:58:29 +0200
committerPetr Mrázek2012-09-29 01:58:29 +0200
commit1bac22884eda76ebd9b265df2dff7e321880a4db (patch)
treeb80dee2600773f5c9c8f4c2e47c685bd44ae993e
parent4258d1eb83f4203f07e5a15f791164d46c5c559b (diff)
parent12f5e6028ce91e67143c7dad317ffe1430603193 (diff)
downloaddfhack-1bac22884eda76ebd9b265df2dff7e321880a4db.tar.gz
dfhack-1bac22884eda76ebd9b265df2dff7e321880a4db.tar.bz2
dfhack-1bac22884eda76ebd9b265df2dff7e321880a4db.tar.xz
xMerge https://github.com/jjyg/dfhack
-rw-r--r--plugins/manipulator.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/plugins/manipulator.cpp b/plugins/manipulator.cpp
index 953cf2ba..feceb08e 100644
--- a/plugins/manipulator.cpp
+++ b/plugins/manipulator.cpp
@@ -383,8 +383,12 @@ viewscreen_unitlaborsst::viewscreen_unitlaborsst(vector<df::unit*> &src, int cur
for (size_t i = 0; i < src.size(); i++)
{
- UnitInfo *cur = new UnitInfo;
df::unit *unit = src[i];
+ if (!unit)
+ continue;
+
+ UnitInfo *cur = new UnitInfo;
+
cur->unit = unit;
cur->allowEdit = true;
cur->active_index = active_idx[unit];