From d9b81fa5f5a471a19bdb78792dea30dfcfb78f22 Mon Sep 17 00:00:00 2001 From: abv Date: Fri, 21 Dec 2012 13:56:44 +0400 Subject: [PATCH] 0023636: Problems initialising errorStream OSD_Error.cxx is protected for the case if errorStream is NULL --- src/OSD/OSD_Error.cxx | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/OSD/OSD_Error.cxx b/src/OSD/OSD_Error.cxx index b1fff5ed9f..962aaabae0 100755 --- a/src/OSD/OSD_Error.cxx +++ b/src/OSD/OSD_Error.cxx @@ -634,6 +634,9 @@ OSD_Error :: OSD_Error () { void OSD_Error :: Perror () { + if (errorStream == NULL) + return; + Standard_Character buff[ 32 ]; Standard_CString ptr; @@ -807,9 +810,12 @@ Standard_Boolean OSD_Error :: Failed () const { void OSD_Error :: Reset () { myErrno = ERROR_SUCCESS; - ( *errorStream ).clear (); - ( *errorStream ).seekp ( 0 ); - ( *errorStream ).clear (); + if (errorStream != NULL) + { + ( *errorStream ).clear (); + ( *errorStream ).seekp ( 0 ); + ( *errorStream ).clear (); + } } // end OSD_Error :: Reset