Fixed potential crash (1500th commit, yay)

Also cleaned up one line of code.


Former-commit-id: 841dde3eb2ce8b1e3b4607931aa31d94fefedec2
This commit is contained in:
Lynix 2015-02-07 19:15:22 +01:00
parent 596ed1fff3
commit d3caf8bb1b
2 changed files with 3 additions and 2 deletions

View File

@ -44,7 +44,8 @@ m_nextFrame(model.m_nextFrame)
NzSkeletalModel::~NzSkeletalModel()
{
m_scene->UnregisterForUpdate(this);
if (m_scene)
m_scene->UnregisterForUpdate(this);
}
void NzSkeletalModel::AddToRenderQueue(NzAbstractRenderQueue* renderQueue) const

View File

@ -1189,6 +1189,6 @@ void NzWindowImpl::WindowThread(HWND* handle, DWORD styleEx, const wchar_t* titl
while (window->m_threadActive)
window->ProcessEvents(true);
DestroyWindow(*handle);
DestroyWindow(winHandle);
}
#endif