WINTERMUTE: Handle camera pointer being null
This commit is contained in:
parent
06ea22dfaa
commit
a1371d002f
1 changed files with 11 additions and 8 deletions
|
@ -373,8 +373,8 @@ bool BaseRenderOpenGL3D::setup3D(Camera3D* camera, bool force) {
|
|||
|
||||
glEnable(GL_NORMALIZE);
|
||||
|
||||
if (camera) {
|
||||
_fov = camera->_fov;
|
||||
setProjection();
|
||||
|
||||
Math::Matrix4 viewMatrix;
|
||||
camera->getViewMatrix(&viewMatrix);
|
||||
|
@ -383,6 +383,9 @@ bool BaseRenderOpenGL3D::setup3D(Camera3D* camera, bool force) {
|
|||
glGetFloatv(GL_MODELVIEW_MATRIX, _lastViewMatrix.getData());
|
||||
}
|
||||
|
||||
setProjection();
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue