Fixed potential crash

Former-commit-id: df8cde180c157f08031cd04d37bb735aa266ee53
This commit is contained in:
Lynix 2015-01-16 12:46:27 +01:00
parent e85c6afa12
commit fbcdd6bb2b
1 changed files with 2 additions and 1 deletions

View File

@ -165,6 +165,7 @@ void NzForwardRenderQueue::Clear(bool fully)
for (auto& overlayPair : overlayMap) for (auto& overlayPair : overlayMap)
{ {
const NzTexture* overlay = overlayPair.first; const NzTexture* overlay = overlayPair.first;
if (overlay)
overlay->RemoveResourceListener(this); overlay->RemoveResourceListener(this);
} }
} }