From: ouv Date: Mon, 16 Sep 2013 10:41:04 +0000 (+0000) Subject: Fixed crash after applying Import Image operation. X-Git-Tag: BR_hydro_v_0_1~28 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=bf1975f425299a5ba4db6301121eab6ec6ac3f40;p=modules%2Fhydro.git Fixed crash after applying Import Image operation. --- diff --git a/src/HYDROGUI/HYDROGUI_ImportImageOp.cxx b/src/HYDROGUI/HYDROGUI_ImportImageOp.cxx index 3ad1959d..37fd753f 100644 --- a/src/HYDROGUI/HYDROGUI_ImportImageOp.cxx +++ b/src/HYDROGUI/HYDROGUI_ImportImageOp.cxx @@ -479,6 +479,14 @@ void HYDROGUI_ImportImageOp::onPointSelected( bool theIsRefImage ) void HYDROGUI_ImportImageOp::closePreview() { + // It's very strange, but without calling this method (it's quite safe) a crash is stably reproduced. + // Scenario: create any non-Graphics view, activate import op, click apply. + // Result: a few SIGSEGVs coming from processEvents(), then crash. + if( myPreviewViewManager ) + if( GraphicsView_Viewer* aViewer = myPreviewViewManager->getViewer() ) + if( GraphicsView_ViewPort* aViewPort = aViewer->getActiveViewPort() ) + aViewPort->onBoundingRectChanged(); + if( myPreviewPrs ) { delete myPreviewPrs;