Skip to content

Commit 7cb4559

Browse files
committed
Merge pull request #694 from smklinger/patch-2
CCTiledMapLayer.m issues #687 & #693
2 parents 7625920 + 950ff65 commit 7cb4559

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cocos2d/CCTiledMapLayer.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ -(id) initWithTilesetInfo:(CCTiledMapTilesetInfo*)tilesetInfo layerInfo:(CCTiled
117117
_mapTileSize = mapInfo.tileSize;
118118
_layerOrientation = mapInfo.orientation;
119119

120-
CGFloat pixelsToPoints = 1.0/tex.contentScale;
120+
CGFloat pixelsToPoints = tex ? 1.0/tex.contentScale : 1.0;
121121

122122
// offset (after layer orientation is set);
123123
CGPoint offset = [self calculateLayerOffset:layerInfo.offset];

0 commit comments

Comments
 (0)