null check for texture in paint function

Fixes #1515
This commit is contained in:
itsmattkc
2021-03-21 12:50:35 +11:00
parent 84c227c003
commit 5b04d84bfb
+4
View File
@@ -282,6 +282,10 @@ void ViewerDisplayWidget::OnPaint()
// We only draw if we have a pipeline
if (last_loaded_buffer_ && color_service()) {
if (!texture_) {
// If no texture, create it now
SetImage(last_loaded_buffer_);
}
TexturePtr texture_to_draw = texture_;