Check log shared pointer before using it.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@137169 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/Expression/ClangExpressionDeclMap.cpp b/source/Expression/ClangExpressionDeclMap.cpp
index f3f4b02..f37eb2a 100644
--- a/source/Expression/ClangExpressionDeclMap.cpp
+++ b/source/Expression/ClangExpressionDeclMap.cpp
@@ -2393,7 +2393,8 @@
     
     if (!ast_type)
     {
-        log->Printf("Tried to add a type for %s, but couldn't get one", context.m_decl_name.getAsString().c_str());
+        if (log)
+            log->Printf("Tried to add a type for %s, but couldn't get one", context.m_decl_name.getAsString().c_str());
         return;
     }