From d4a2bdfa3d33263481a82b0a3e28b98613bd5c30 Mon Sep 17 00:00:00 2001 From: scrawl Date: Mon, 2 Apr 2012 20:46:42 +0200 Subject: [PATCH] fix crash when hardware occlusion queries unsupporetd --- apps/openmw/mwrender/sky.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/apps/openmw/mwrender/sky.cpp b/apps/openmw/mwrender/sky.cpp index 2fdf9b2cd6..781f7abd5d 100644 --- a/apps/openmw/mwrender/sky.cpp +++ b/apps/openmw/mwrender/sky.cpp @@ -746,6 +746,7 @@ void SkyManager::setGlare(const float glare) Vector3 SkyManager::getRealSunPos() { + if (!mCreated) return Vector3(0,0,0); return mSun->getNode()->_getDerivedPosition(); }