-// File: TDataStd_ByteArray.cxx
-// Created: May 29 11:40:00 2007
-// Author: Vlad Romashko
-// <vladislav.romashko@opencascade.com>
-//Copyright: Open CasCade SA 2007
+// Created on: 2007-05-29
+// Created by: Vlad Romashko
+// Copyright (c) 2007-2014 OPEN CASCADE SAS
+//
+// This file is part of Open CASCADE Technology software library.
+//
+// This library is free software; you can redistribute it and/or modify it under
+// the terms of the GNU Lesser General Public License version 2.1 as published
+// by the Free Software Foundation, with special exception defined in the file
+// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
+// distribution for complete text of the license and disclaimer of any warranty.
+//
+// Alternatively, this file may be used under the terms of Open CASCADE
+// commercial license or contractual agreement.
#include <TDataStd_ByteArray.ixx>
#include <TDataStd_DeltaOnModificationOfByteArray.hxx>
void TDataStd_ByteArray::SetValue (const Standard_Integer index,
const Standard_Byte value)
{
+ if (myValue.IsNull())
+ return;
if (value == myValue->Value(index))
return;
Backup();
(const Handle(TDF_Attribute)& OldAttribute) const
{
if(myIsDelta)
- return new TDataStd_DeltaOnModificationOfByteArray(*((Handle(TDataStd_ByteArray)*)&OldAttribute));
+ return new TDataStd_DeltaOnModificationOfByteArray(Handle(TDataStd_ByteArray)::DownCast (OldAttribute));
else return new TDF_DefaultDeltaOnModification(OldAttribute);
}