diff --git a/projects/clr/rocclr/runtime/platform/program.cpp b/projects/clr/rocclr/runtime/platform/program.cpp index 979b4ccb29..f9926a83bb 100644 --- a/projects/clr/rocclr/runtime/platform/program.cpp +++ b/projects/clr/rocclr/runtime/platform/program.cpp @@ -38,6 +38,11 @@ Program::~Program() { } const Symbol* Program::findSymbol(const char* kernelName) const { + // avoid seg. fault if the program has not built yet + if (symbolTable_ == NULL) { + return NULL; + } + symbols_t::const_iterator it = symbolTable_->find(kernelName); return (it == symbolTable_->end()) ? NULL : &it->second; }