From 233152eb5cb05a1b296bdb96bbd6b3133128770f Mon Sep 17 00:00:00 2001 From: asl Date: Tue, 15 Nov 2005 07:27:54 +0000 Subject: [PATCH] PAL10328 - crash if user try to change number of isolines in OCC and apply changes --- src/LightApp/LightApp_Application.cxx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/LightApp/LightApp_Application.cxx b/src/LightApp/LightApp_Application.cxx index 19d6fc62e..0ba2a8bac 100644 --- a/src/LightApp/LightApp_Application.cxx +++ b/src/LightApp/LightApp_Application.cxx @@ -1610,7 +1610,11 @@ void LightApp_Application::preferencesChanged( const QString& sec, const QString int u = resMgr->integerValue( sec, "iso_number_u" ); int v = resMgr->integerValue( sec, "iso_number_v" ); for ( QPtrListIterator it( lst ); it.current(); ++it ) - ((OCCViewer_Viewer*)it.current())->setIsos( u, v ); + { + OCCViewer_ViewManager* mgr = dynamic_cast( it.current() ); + if( mgr && mgr->getOCCViewer() ) + mgr->getOCCViewer()->setIsos( u, v ); + } } if( sec=="ObjectBrowser" ) -- 2.39.2