diff --git a/src/clang_complete.cc b/src/clang_complete.cc index 447f4d26..34d04f39 100644 --- a/src/clang_complete.cc +++ b/src/clang_complete.cc @@ -404,7 +404,8 @@ void CompletionQueryMain(ClangCompleteManager* completion_manager) { kCompleteOptions); if (!cx_results) { timer.ResetAndPrint("[complete] Code completion failed"); - request->on_complete({}, false /*is_cached_result*/); + if (request->on_complete) + request->on_complete({}, false /*is_cached_result*/); continue; }