Merge pull request #7200 from hyperlogic/tony/box-render-crash-fix

Crash fix for RenderableBoxEntityItem::render
This commit is contained in:
Andrew Meadows 2016-02-26 10:25:50 -08:00
commit c4798870d5

View file

@ -62,7 +62,7 @@ void RenderableBoxEntityItem::render(RenderArgs* args) {
}
batch.setModelTransform(transToCenter); // we want to include the scale as well
if (_procedural->ready()) {
if (_procedural && _procedural->ready()) {
_procedural->prepare(batch, getPosition(), getDimensions());
auto color = _procedural->getColor(cubeColor);
batch._glColor4f(color.r, color.g, color.b, color.a);