Index: clang/lib/StaticAnalyzer/Checkers/RetainCountChecker/RetainCountChecker.cpp =================================================================== --- clang/lib/StaticAnalyzer/Checkers/RetainCountChecker/RetainCountChecker.cpp +++ clang/lib/StaticAnalyzer/Checkers/RetainCountChecker/RetainCountChecker.cpp @@ -1425,7 +1425,10 @@ // Fetch the new reference count from the state, and use it to handle // this symbol. - state = handleSymbolDeath(state, Sym, *getRefBinding(state, Sym), Leaked); + const RefVal* T = getRefBinding(state, Sym); + if (!T) + return; + state = handleSymbolDeath(state, Sym, *T, Leaked); } }