Check that we got back an object from MakeFunctionCaller
before we call through it.
<rdar://problem/28979705>
llvm-svn: 285369
diff --git a/lldb/source/Plugins/SystemRuntime/MacOSX/AppleGetItemInfoHandler.cpp b/lldb/source/Plugins/SystemRuntime/MacOSX/AppleGetItemInfoHandler.cpp
index a4d73ee..9d0f0da 100644
--- a/lldb/source/Plugins/SystemRuntime/MacOSX/AppleGetItemInfoHandler.cpp
+++ b/lldb/source/Plugins/SystemRuntime/MacOSX/AppleGetItemInfoHandler.cpp
@@ -188,7 +188,7 @@
get_item_info_caller = m_get_item_info_impl_code->MakeFunctionCaller(
get_item_info_return_type, get_item_info_arglist,
thread.shared_from_this(), error);
- if (error.Fail()) {
+ if (error.Fail() || get_item_info_caller == nullptr) {
if (log)
log->Printf("Error Inserting get-item-info function: \"%s\".",
error.AsCString());
diff --git a/lldb/source/Plugins/SystemRuntime/MacOSX/AppleGetPendingItemsHandler.cpp b/lldb/source/Plugins/SystemRuntime/MacOSX/AppleGetPendingItemsHandler.cpp
index 452d319..38bf336 100644
--- a/lldb/source/Plugins/SystemRuntime/MacOSX/AppleGetPendingItemsHandler.cpp
+++ b/lldb/source/Plugins/SystemRuntime/MacOSX/AppleGetPendingItemsHandler.cpp
@@ -192,7 +192,7 @@
m_get_pending_items_impl_code->MakeFunctionCaller(
get_pending_items_return_type, get_pending_items_arglist,
thread_sp, error);
- if (error.Fail()) {
+ if (error.Fail() || get_pending_items_caller == nullptr) {
if (log)
log->Printf("Failed to install pending-items introspection function "
"caller: %s.",
diff --git a/lldb/source/Plugins/SystemRuntime/MacOSX/AppleGetQueuesHandler.cpp b/lldb/source/Plugins/SystemRuntime/MacOSX/AppleGetQueuesHandler.cpp
index fc3da32..3994c28 100644
--- a/lldb/source/Plugins/SystemRuntime/MacOSX/AppleGetQueuesHandler.cpp
+++ b/lldb/source/Plugins/SystemRuntime/MacOSX/AppleGetQueuesHandler.cpp
@@ -205,7 +205,7 @@
Error error;
get_queues_caller = m_get_queues_impl_code_up->MakeFunctionCaller(
get_queues_return_type, get_queues_arglist, thread_sp, error);
- if (error.Fail()) {
+ if (error.Fail() || get_queues_caller == nullptr) {
if (log)
log->Printf(
"Could not get function caller for get-queues function: %s.",
diff --git a/lldb/source/Plugins/SystemRuntime/MacOSX/AppleGetThreadItemInfoHandler.cpp b/lldb/source/Plugins/SystemRuntime/MacOSX/AppleGetThreadItemInfoHandler.cpp
index d3ab0fa..4ed43e5 100644
--- a/lldb/source/Plugins/SystemRuntime/MacOSX/AppleGetThreadItemInfoHandler.cpp
+++ b/lldb/source/Plugins/SystemRuntime/MacOSX/AppleGetThreadItemInfoHandler.cpp
@@ -203,7 +203,7 @@
m_get_thread_item_info_impl_code->MakeFunctionCaller(
get_thread_item_info_return_type, get_thread_item_info_arglist,
thread_sp, error);
- if (error.Fail()) {
+ if (error.Fail() || get_thread_item_info_caller == nullptr) {
if (log)
log->Printf("Failed to install get-thread-item-info introspection "
"caller: %s.",