add NULL check for ibuf, was crashing while rendering randomly

This commit is contained in:
Campbell Barton
2012-06-28 17:26:21 +00:00
parent 1a2852cf1c
commit 5a8b3dc1f9

View File

@@ -92,7 +92,8 @@ void ViewerBaseOperation:: updateImage(rcti *rect)
void ViewerBaseOperation::deinitExecution()
{
ImBuf *ibuf = BKE_image_acquire_ibuf(this->m_image, this->m_imageUser, &this->m_lock);
IMB_display_buffer_invalidate(ibuf);
if (ibuf)
IMB_display_buffer_invalidate(ibuf);
BKE_image_release_ibuf(this->m_image, this->m_lock);
this->m_outputBuffer = NULL;