mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-14 06:50:29 +02:00
Merge pull request #18543 from hrydgard/minor-crash-fix
Minor debugger-related crash fixes
This commit is contained in:
2 files changed
+9
-2
No files matched your search
@@ -288,7 +288,12 @@ void MemSlabMap::Clear() {
|
||||
|
||||
MemSlabMap::Slab *MemSlabMap::FindSlab(uint32_t addr) {
|
||||
// Jump ahead using our index.
|
||||
Slab *slab = heads_[addr / SLICE_SIZE];
|
||||
size_t slabIndex = addr / SLICE_SIZE;
|
||||
if (slabIndex >= heads_.size()) {
|
||||
// Shouldn't happen, but apparently can.
|
||||
return nullptr;
|
||||
}
|
||||
Slab *slab = heads_[slabIndex];
|
||||
// We often move forward, so check the last find.
|
||||
if (lastFind_->start > slab->start && lastFind_->start <= addr)
|
||||
slab = lastFind_;
|
||||
|
||||
@@ -672,7 +672,9 @@ bool CtrlStackTraceView::WindowMessage(UINT msg, WPARAM wParam, LPARAM lParam, L
|
||||
|
||||
void CtrlStackTraceView::GetColumnText(wchar_t* dest, int row, int col)
|
||||
{
|
||||
if (row < 0 || row >= (int)frames.size()) {
|
||||
// We should have emptied the list if g_symbolMap is nullptr, but apparently we don't,
|
||||
// so let's have a sanity check here.
|
||||
if (row < 0 || row >= (int)frames.size() || !g_symbolMap) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user