renderer: if texture is null, don't allocate a frame unless exporting

This commit is contained in:
itsmattkc
2020-09-19 12:53:07 +10:00
parent 7bc841904a
commit 8e0c86a6fa
2 changed files with 6 additions and 2 deletions
+5 -1
View File
@@ -99,7 +99,11 @@ void ViewerDisplayWidget::SetSignalCursorColorEnabled(bool e)
void ViewerDisplayWidget::SetImage(FramePtr in_buffer)
{
last_loaded_buffer_ = in_buffer;
if (in_buffer && in_buffer->is_allocated()) {
last_loaded_buffer_ = in_buffer;
} else {
last_loaded_buffer_ = nullptr;
}
if (last_loaded_buffer_) {
makeCurrent();