OCC18056 Exception during copying Array attribute with array(0,0)

This commit is contained in:
SZY
2011-04-28 15:40:24 +00:00
committed by bugmaster
parent 762aacaed7
commit a855b7eb8b
6 changed files with 46 additions and 15 deletions

View File

@@ -128,7 +128,7 @@ void TDataStd_ByteArray::ChangeArray (const Handle(TColStd_HArray1OfByte)& newAr
Standard_Boolean aDimEqual = Standard_False;
Standard_Integer i;
if ((Lower() || Upper()) && Lower() == aLower && Upper() == anUpper ) {
if ( Lower() == aLower && Upper() == anUpper ) {
aDimEqual = Standard_True;
if(isCheckItems) {
Standard_Boolean isEqual = Standard_True;
@@ -145,7 +145,7 @@ void TDataStd_ByteArray::ChangeArray (const Handle(TColStd_HArray1OfByte)& newAr
Backup();
// Handles of myValue of current and backuped attributes will be different!
if(!aDimEqual)
if(myValue.IsNull() || !aDimEqual)
myValue = new TColStd_HArray1OfByte(aLower, anUpper);
for(i = aLower; i <= anUpper; i++)