fixes by matthias

This commit is contained in:
Joachim Schoeberl 2012-05-24 11:12:37 +00:00
parent 76a9a8037b
commit 6741b74a54
2 changed files with 2 additions and 1 deletions

View File

@ -371,7 +371,7 @@ namespace netgen
/// array copy /// array copy
ArrayMem & operator= (const FlatArray<T> & a2) ArrayMem & operator= (const FlatArray<T> & a2)
{ {
SetSize (a2.Size()); this->SetSize (a2.Size());
for (int i = 0; i < size; i++) for (int i = 0; i < size; i++)
(*this)[i] = a2[i]; (*this)[i] = a2[i];
return *this; return *this;

View File

@ -38,6 +38,7 @@ namespace netgen
void BaseDynamicMem :: SetName (const char * aname) void BaseDynamicMem :: SetName (const char * aname)
{ {
delete [] name; delete [] name;
name = NULL;
if (aname) if (aname)
{ {
name = new char[strlen(aname)+1]; name = new char[strlen(aname)+1];