Browse Source

Update STEPFileReader.cpp

StepFileReadder: initialize var with nullptr.
Kim Kulling 9 years ago
parent
commit
a2d9cbef7e
1 changed files with 1 additions and 1 deletions
  1. 1 1
      code/STEPFileReader.cpp

+ 1 - 1
code/STEPFileReader.cpp

@@ -126,7 +126,7 @@ STEP::DB* STEP::ReadFileHeader(boost::shared_ptr<IOStream> stream)
                 if (list->GetSize() > 1)    {
                 if (list->GetSize() > 1)    {
                     DefaultLogger::get()->warn(AddLineNumber("multiple schemas currently not supported",line));
                     DefaultLogger::get()->warn(AddLineNumber("multiple schemas currently not supported",line));
                 }
                 }
-                const EXPRESS::STRING* string;
+                const EXPRESS::STRING* string( nullptr );
                 if (!list->GetSize() || !(string=dynamic_cast<const EXPRESS::STRING*>( (*list)[0].get() ))) {
                 if (!list->GetSize() || !(string=dynamic_cast<const EXPRESS::STRING*>( (*list)[0].get() ))) {
                     throw STEP::SyntaxError("expected FILE_SCHEMA to contain a single string literal",line);
                     throw STEP::SyntaxError("expected FILE_SCHEMA to contain a single string literal",line);
                 }
                 }