Fix assert on opening empty watchpoints/breakpoints windows

This commit is contained in:
Vas Crabb 2015-02-26 01:28:03 +11:00
parent a406fe29e2
commit 0853e5f3b6
2 changed files with 4 additions and 2 deletions

View File

@ -213,7 +213,8 @@ void debug_view_breakpoints::gather_breakpoints()
}
// And now for the sort
qsort(&m_buffer[0], m_buffer.count(), sizeof(device_debug::breakpoint *), m_sortType);
if (m_buffer.count() > 0)
qsort(&m_buffer[0], m_buffer.count(), sizeof(device_debug::breakpoint *), m_sortType);
}

View File

@ -240,7 +240,8 @@ void debug_view_watchpoints::gather_watchpoints()
}
// And now for the sort
qsort(&m_buffer[0], m_buffer.count(), sizeof(device_debug::watchpoint *), m_sortType);
if (m_buffer.count() > 0)
qsort(&m_buffer[0], m_buffer.count(), sizeof(device_debug::watchpoint *), m_sortType);
}