null before using it.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172632
91177308-0d34-0410-b5e6-
96231b3b80d8
ReparseTranslationUnitInfo *RTUI =
static_cast<ReparseTranslationUnitInfo*>(UserData);
CXTranslationUnit TU = RTUI->TU;
+ if (!TU)
+ return;
// Reset the associated diagnostics.
delete static_cast<CXDiagnosticSetImpl*>(TU->Diagnostics);
(void) options;
RTUI->result = 1;
- if (!TU)
- return;
-
CIndexer *CXXIdx = (CIndexer*)TU->CIdx;
if (CXXIdx->isOptEnabled(CXGlobalOpt_ThreadBackgroundPriorityForEditing))
setThreadBackgroundPriority();