From: nds Date: Thu, 31 May 2012 08:34:08 +0000 (+0000) Subject: There are two problems: X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=0d771c25ab1af1fbcbf1efe7b9e3aa0f26d4f97f;p=modules%2Fgui.git There are two problems: 1) This is a limitation, that it is possible to select in OB only data objects with not empty names. 2) Selection manager performs an access to IO of selected LightApp_DataOwner without an existing check, so a crashed happens. There can be reproduced by creation LightApp_DataOwner with an entry parameter, without IO set. --- diff --git a/src/LightApp/LightApp_Application.cxx b/src/LightApp/LightApp_Application.cxx index 8880510ce..c9bb7b064 100644 --- a/src/LightApp/LightApp_Application.cxx +++ b/src/LightApp/LightApp_Application.cxx @@ -3703,8 +3703,7 @@ bool LightApp_Application::checkDataObject(LightApp_DataObject* theObj) if (theObj) { bool isSuitable = !theObj->entry().isEmpty() && - !theObj->componentDataType().isEmpty() && - !theObj->name().isEmpty(); + !theObj->componentDataType().isEmpty(); return isSuitable; } diff --git a/src/LightApp/LightApp_SelectionMgr.cxx b/src/LightApp/LightApp_SelectionMgr.cxx index 23e2c6352..5735d6c74 100644 --- a/src/LightApp/LightApp_SelectionMgr.cxx +++ b/src/LightApp/LightApp_SelectionMgr.cxx @@ -113,7 +113,7 @@ void LightApp_SelectionMgr::selectedObjects( SALOME_ListIO& theList, const QStri if ( !owner ) continue; - if ( !aSet.contains( owner->entry() ) ) { + if ( !aSet.contains( owner->entry() ) && !owner->IO().IsNull() ) { selList.append( owner->IO() ); aSet.insert( owner->entry() ); }