diff options
| author | Jonas Ask | 2009-11-25 23:08:38 +0000 |
|---|---|---|
| committer | Jonas Ask | 2009-11-25 23:08:38 +0000 |
| commit | 1b76d26f714d89066c199362f6714d92eaea3f20 (patch) | |
| tree | 42d0bcad3dc2512f4bf4c3c7e2013e7993622cf0 /Constructions.cpp | |
| parent | e8926b0c51eb0d7cd3306f104e5878aaa7141658 (diff) | |
| download | stonesense-1b76d26f714d89066c199362f6714d92eaea3f20.tar.gz stonesense-1b76d26f714d89066c199362f6714d92eaea3f20.tar.bz2 stonesense-1b76d26f714d89066c199362f6714d92eaea3f20.tar.xz | |
Added sanity check (which is really quite redundant 99.99% of the time..) to changeConstructionMaterials.
Diffstat (limited to 'Constructions.cpp')
| -rw-r--r-- | Constructions.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Constructions.cpp b/Constructions.cpp index 13846fe..a269509 100644 --- a/Constructions.cpp +++ b/Constructions.cpp @@ -13,6 +13,7 @@ void changeConstructionMaterials(WorldSegment* segment, vector<t_construction>* while(--i >= 0){
construct = &(*allConstructions)[i];
b = segment->getBlock(construct->x, construct->y, construct->z);
+ if( !b ) continue;
//replace floor, wall and ramp types
if(b->floorType > 0){
switch(construct->material.type){
|
