From 2d6e631107c1e1125d50a9e391bc148573f438d2 Mon Sep 17 00:00:00 2001 From: Gaute Lindkvist Date: Thu, 17 Oct 2019 09:08:14 +0200 Subject: [PATCH] Fix crash when changing application fonts --- .../UserInterface/RiuMainWindow.cpp | 20 +++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/ApplicationCode/UserInterface/RiuMainWindow.cpp b/ApplicationCode/UserInterface/RiuMainWindow.cpp index c5688c58c8..2ba6884ba2 100644 --- a/ApplicationCode/UserInterface/RiuMainWindow.cpp +++ b/ApplicationCode/UserInterface/RiuMainWindow.cpp @@ -1766,10 +1766,22 @@ void RiuMainWindow::setDefaultToolbarVisibility() //-------------------------------------------------------------------------------------------------- void RiuMainWindow::applyFontSizesToDockedPlots() { - m_resultQwtPlot->applyFontSizes( true ); - m_mohrsCirclePlot->applyFontSizes( true ); - m_relPermPlotPanel->applyFontSizes( true ); - m_pvtPlotPanel->applyFontSizes( true ); + if ( m_resultQwtPlot ) + { + m_resultQwtPlot->applyFontSizes( true ); + } + if ( m_mohrsCirclePlot ) + { + m_mohrsCirclePlot->applyFontSizes( true ); + } + if ( m_relPermPlotPanel ) + { + m_relPermPlotPanel->applyFontSizes( true ); + } + if ( m_pvtPlotPanel ) + { + m_pvtPlotPanel->applyFontSizes( true ); + } } //--------------------------------------------------------------------------------------------------