0022931: Wrong delete operator in Message_Msg.cxx / Message_PrinterOStream.cxx
[occt.git] / src / Message / Message_PrinterOStream.cxx
index b74b18f..93cd194 100755 (executable)
@@ -122,7 +122,8 @@ void Message_PrinterOStream::Send (const TCollection_ExtendedString &theString,
     char* astr = new char[theString.LengthOfCString()+1];
     theString.ToUTF8CString (astr);
     Send ( astr, theGravity, putEndl );
-    delete astr;
+    delete [] astr;
+    astr = 0;
   }
   else {
     TCollection_AsciiString aStr ( theString, '?' );