From bbeb149df43e122ce8ed37afdddaaa3645309c1e Mon Sep 17 00:00:00 2001 From: Sergey Lipskiy Date: Thu, 19 Feb 2015 13:01:31 +0600 Subject: [PATCH] Correct FrameBufferList::removeBuffer - set m_pCurrent to NULL if current color buffer isd removed. --- FrameBuffer.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/FrameBuffer.cpp b/FrameBuffer.cpp index fdcbcb77..cfffdf5a 100644 --- a/FrameBuffer.cpp +++ b/FrameBuffer.cpp @@ -357,6 +357,8 @@ void FrameBufferList::removeBuffer(u32 _address ) { for (FrameBuffers::iterator iter = m_list.begin(); iter != m_list.end(); ++iter) if (iter->m_startAddress == _address) { + if (m_pCurrent != NULL && m_pCurrent->m_startAddress == _address) + m_pCurrent = NULL; m_list.erase(iter); return; }