From 8fe3d4779dce7832b70deddbb480248937307c49 Mon Sep 17 00:00:00 2001 From: Greg Clayton Date: Fri, 21 Feb 2014 19:06:44 +0000 Subject: 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. llvm-svn: 201872 --- lldb/source/Interpreter/ScriptInterpreterPython.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lldb/source/Interpreter/ScriptInterpreterPython.cpp') diff --git a/lldb/source/Interpreter/ScriptInterpreterPython.cpp b/lldb/source/Interpreter/ScriptInterpreterPython.cpp index f0c32b45b49..389355d9bf9 100644 --- a/lldb/source/Interpreter/ScriptInterpreterPython.cpp +++ b/lldb/source/Interpreter/ScriptInterpreterPython.cpp @@ -2542,8 +2542,8 @@ ScriptInterpreterPython::InitializePrivate () 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. -- cgit v1.2.3