[Lldb-commits] [lldb] r219936 - Fix MemoryHistory plugin to check whether the plugin
Jason Molenda
jmolenda at apple.com
Thu Oct 16 09:59:23 PDT 2014
Author: jmolenda
Date: Thu Oct 16 11:59:23 2014
New Revision: 219936
URL: http://llvm.org/viewvc/llvm-project?rev=219936&view=rev
Log:
Fix MemoryHistory plugin to check whether the plugin
was able to create itself before returning the shared
pointer to it.
clang warning.
Modified:
lldb/trunk/source/Target/MemoryHistory.cpp
Modified: lldb/trunk/source/Target/MemoryHistory.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/MemoryHistory.cpp?rev=219936&r1=219935&r2=219936&view=diff
==============================================================================
--- lldb/trunk/source/Target/MemoryHistory.cpp (original)
+++ lldb/trunk/source/Target/MemoryHistory.cpp Thu Oct 16 11:59:23 2014
@@ -21,7 +21,9 @@ MemoryHistory::FindPlugin (const Process
for (uint32_t idx = 0; (create_callback = PluginManager::GetMemoryHistoryCreateCallbackAtIndex(idx)) != NULL; ++idx)
{
- return create_callback(process);
+ MemoryHistorySP memory_history_sp (create_callback (process));
+ if (memory_history_sp.get())
+ return memory_history_sp;
}
return MemoryHistorySP();
More information about the lldb-commits
mailing list