Check for NULL breakpoint option thread name & queue name before comparing their values to the new value.

<rdar://problem/13065198>

llvm-svn: 173308
This commit is contained in:
Jim Ingham 2013-01-23 23:14:13 +00:00
parent 8879c43a53
commit 8bebe00a24
1 changed files with 4 additions and 2 deletions

View File

@ -242,7 +242,8 @@ Breakpoint::GetThreadIndex() const
void
Breakpoint::SetThreadName (const char *thread_name)
{
if (::strcmp (m_options.GetThreadSpec()->GetName(), thread_name) == 0)
if (m_options.GetThreadSpec()->GetName() != NULL
&& ::strcmp (m_options.GetThreadSpec()->GetName(), thread_name) == 0)
return;
m_options.GetThreadSpec()->SetName (thread_name);
@ -261,7 +262,8 @@ Breakpoint::GetThreadName () const
void
Breakpoint::SetQueueName (const char *queue_name)
{
if (::strcmp (m_options.GetThreadSpec()->GetQueueName(), queue_name) == 0)
if (m_options.GetThreadSpec()->GetQueueName() != NULL
&& ::strcmp (m_options.GetThreadSpec()->GetQueueName(), queue_name) == 0)
return;
m_options.GetThreadSpec()->SetQueueName (queue_name);