Add missing nullptr checks.
GetPersistentExpressionStateForLanguage() can return a nullptr if it cannot construct a typesystem. This patch adds missing nullptr checks at all uses. Inspired by rdar://problem/58317195 Differential Revision: https://reviews.llvm.org/D72413
This commit is contained in:
@@ -283,6 +283,8 @@ void REPL::IOHandlerInputComplete(IOHandler &io_handler, std::string &code) {
|
||||
|
||||
PersistentExpressionState *persistent_state =
|
||||
m_target.GetPersistentExpressionStateForLanguage(GetLanguage());
|
||||
if (!persistent_state)
|
||||
return;
|
||||
|
||||
const size_t var_count_before = persistent_state->GetSize();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user