diff --git a/Engine/source/forest/forestWindEmitter.cpp b/Engine/source/forest/forestWindEmitter.cpp index 67dc3fc12..20ad621cf 100644 --- a/Engine/source/forest/forestWindEmitter.cpp +++ b/Engine/source/forest/forestWindEmitter.cpp @@ -521,8 +521,8 @@ void ForestWindEmitter::_renderEmitterInfo( ObjectRenderInst *ri, SceneRenderSta { // If the camera is close to the sphere, shrink the sphere so it remains visible. GameConnection* gc = GameConnection::getConnectionToServer(); - GameBase* gb; - if ( gc && (gb = gc->getCameraObject()) ) + GameBase *gb = gc ? gc->getCameraObject() : NULL; + if (gb) { F32 camDist = (gb->getPosition() - getPosition()).len(); if ( camDist < mWindRadius )