Make sure the module_uuid_ptr is non-NULL before checking whether its contents match the module's UUID.

llvm-svn: 157971
This commit is contained in:
Jim Ingham 2012-06-05 00:34:37 +00:00
parent f5dad49a65
commit 38c5849e7e
1 changed files with 2 additions and 2 deletions

View File

@ -708,7 +708,7 @@ PlatformRemoteiOS::GetSharedModule (const ModuleSpec &module_spec,
module_spec.GetArchitecture(), module_spec.GetArchitecture(),
module_sp, module_sp,
NULL); NULL);
if (module_sp && module_sp->GetUUID() == *module_uuid_ptr) if (module_sp && ((module_uuid_ptr == NULL) || (module_sp->GetUUID() == *module_uuid_ptr)))
{ {
//printf ("sdk[%u] last found\n", m_last_module_sdk_idx); //printf ("sdk[%u] last found\n", m_last_module_sdk_idx);
error.Clear(); error.Clear();
@ -734,7 +734,7 @@ PlatformRemoteiOS::GetSharedModule (const ModuleSpec &module_spec,
module_spec.GetArchitecture(), module_spec.GetArchitecture(),
module_sp, module_sp,
NULL); NULL);
if (module_sp && module_sp->GetUUID() == *module_uuid_ptr) if (module_sp && ((module_uuid_ptr == NULL) || (module_sp->GetUUID() == *module_uuid_ptr)))
{ {
// Remember the index of the last SDK that we found a file // Remember the index of the last SDK that we found a file
// in in case the wrong SDK was selected. // in in case the wrong SDK was selected.