From c86aa6957b83497a71a26732271caf48fc29c514 Mon Sep 17 00:00:00 2001 From: Stephen Anthony Date: Thu, 23 May 2019 18:24:00 -0230 Subject: [PATCH] Fix crash in certain cases (most obvious when selecting cart tabs in debugger). --- src/gui/Dialog.cxx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/gui/Dialog.cxx b/src/gui/Dialog.cxx index 296ce9d73..28f3de0e7 100644 --- a/src/gui/Dialog.cxx +++ b/src/gui/Dialog.cxx @@ -422,11 +422,12 @@ void Dialog::drawDialog() // Draw outlines for focused widgets // Don't change focus, since this will trigger lost and received // focus events - if (_focusedWidget) + if(_focusedWidget) { _focusedWidget = Widget::setFocusForChain(this, getFocusList(), _focusedWidget, 0, false); - _focusedWidget->draw(); // make sure the highlight color is drawn initially + if(_focusedWidget) + _focusedWidget->draw(); // make sure the highlight color is drawn initially } }