[Lldb-commits] [lldb] r201872 - Don't crash when we build with python enabled, yet we don't link in the lldb::SB* API layer.

Greg Clayton gclayton at apple.com
Fri Feb 21 11:06:44 PST 2014


Author: gclayton
Date: Fri Feb 21 13:06:44 2014
New Revision: 201872

URL: http://llvm.org/viewvc/llvm-project?rev=201872&view=rev
Log:
Don't crash when we build with python enabled, yet we don't link in the lldb::SB* API layer. 

Previously the lldb-platform and lldb-gdbserver would crash.


Modified:
    lldb/trunk/source/Interpreter/ScriptInterpreterPython.cpp

Modified: lldb/trunk/source/Interpreter/ScriptInterpreterPython.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Interpreter/ScriptInterpreterPython.cpp?rev=201872&r1=201871&r2=201872&view=diff
==============================================================================
--- lldb/trunk/source/Interpreter/ScriptInterpreterPython.cpp (original)
+++ lldb/trunk/source/Interpreter/ScriptInterpreterPython.cpp Fri Feb 21 13:06:44 2014
@@ -2542,8 +2542,8 @@ ScriptInterpreterPython::InitializePriva
     Py_InitializeEx (0);
 
     // Initialize SWIG after setting up python
-    assert (g_swig_init_callback != NULL);
-    g_swig_init_callback ();
+    if (g_swig_init_callback)
+        g_swig_init_callback ();
 
     // Update the path python uses to search for modules to include the current directory.
 





More information about the lldb-commits mailing list