cocos2d/cocos2d-x — pull request #2570 by smshuja (2013-05-16 09:29:39+00:00)
Title: cpSpacePointQueryFirst returns Shape object when it should return null

When calling space.pointQueryFirst() through JSB, it always returns a shape even if no shape is found and calling any function on this value results in Bad Access error. I have added a check to return null if no shape is found.