From c68728637ee063231648aec9b9ab687db51a2ff5 Mon Sep 17 00:00:00 2001 From: asl Date: Fri, 10 Nov 2017 13:48:13 +0300 Subject: [PATCH] patch for crash --- src/HYDROGUI/HYDROGUI_ProfileDlg.cxx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/HYDROGUI/HYDROGUI_ProfileDlg.cxx b/src/HYDROGUI/HYDROGUI_ProfileDlg.cxx index 92559c7b..239645b4 100644 --- a/src/HYDROGUI/HYDROGUI_ProfileDlg.cxx +++ b/src/HYDROGUI/HYDROGUI_ProfileDlg.cxx @@ -313,7 +313,12 @@ void HYDROGUI_ProfileDlg::SwitchToProfile(int theIndex) anAISObject->SetWidth(1); } } - (*myProfilesPointer)[0]->getDisplayer()->Update(); + + if( myProfilesPointer && + myProfilesPointer->size()>0 && + myProfilesPointer->at(0) && + myProfilesPointer->at(0)->getDisplayer() ) + myProfilesPointer->at(0)->getDisplayer()->Update(); } void HYDROGUI_ProfileDlg::onAddBtnPressed(bool) -- 2.39.2