mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2024-11-15 18:18:35 +05:00
IPAL21263 addToStudy with doRestoreSubShapes=True leads to crash
This commit is contained in:
parent
088d034a95
commit
a99792b9bd
@ -802,18 +802,18 @@ GEOM::ListOfGO* GEOM_Gen_i::RestoreSubShapesSO (SALOMEDS::Study_ptr theStudy
|
|||||||
return aParts._retn();
|
return aParts._retn();
|
||||||
|
|
||||||
aParts = RestoreSubShapes(theStudy, anO, theSObject, theArgs, theFindMethod, theInheritFirstArg);
|
aParts = RestoreSubShapes(theStudy, anO, theSObject, theArgs, theFindMethod, theInheritFirstArg);
|
||||||
aParts._retn();
|
return aParts._retn();
|
||||||
}
|
}
|
||||||
|
|
||||||
//============================================================================
|
//============================================================================
|
||||||
// function : addToListOfGO
|
// function : addToListOfGO
|
||||||
// purpose : static local function
|
// purpose : static local function
|
||||||
//============================================================================
|
//============================================================================
|
||||||
static void addToListOfGO( const GEOM::GEOM_Object_var& theObject,
|
static void addToListOfGO( const GEOM::GEOM_Object_ptr& theObject,
|
||||||
GEOM::ListOfGO_var& theList )
|
GEOM::ListOfGO& theList )
|
||||||
{
|
{
|
||||||
const int oldLen = theList->length();
|
const int oldLen = theList.length();
|
||||||
theList->length(oldLen + 1);
|
theList.length(oldLen + 1);
|
||||||
theList[ oldLen ] = theObject;
|
theList[ oldLen ] = theObject;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -821,12 +821,12 @@ static void addToListOfGO( const GEOM::GEOM_Object_var& theObject,
|
|||||||
// function : addToListOfGO
|
// function : addToListOfGO
|
||||||
// purpose : static local function
|
// purpose : static local function
|
||||||
//============================================================================
|
//============================================================================
|
||||||
static void addToListOfGO( GEOM::ListOfGO_var& theSrcList,
|
static void addToListOfGO( const GEOM::ListOfGO& theSrcList,
|
||||||
GEOM::ListOfGO_var& theTrgList )
|
GEOM::ListOfGO& theTrgList )
|
||||||
{
|
{
|
||||||
const int oldLen = theTrgList->length();
|
const int oldLen = theTrgList.length();
|
||||||
const int srcLen = theSrcList->length();
|
const int srcLen = theSrcList.length();
|
||||||
theTrgList->length(oldLen + srcLen);
|
theTrgList.length(oldLen + srcLen);
|
||||||
for( int i = 0; i < srcLen; i++ )
|
for( int i = 0; i < srcLen; i++ )
|
||||||
theTrgList[ oldLen + i ] = theSrcList[ i ];
|
theTrgList[ oldLen + i ] = theSrcList[ i ];
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user