Skip to content

Commit e286b8d

Browse files
Don't dereference the first element of an empty container.
llvm-svn: 260331
1 parent 9d67c1e commit e286b8d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lldb/source/Symbol/Symtab.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ Symtab::Resize(size_t count)
5656
// Clients should grab the mutex from this symbol table and lock it manually
5757
// when calling this function to avoid performance issues.
5858
m_symbols.resize (count);
59-
return &m_symbols[0];
59+
return m_symbols.empty() ? nullptr : &m_symbols[0];
6060
}
6161

6262
uint32_t

0 commit comments

Comments
 (0)