From ecc1d6e5f9c4698f9b69f09e8db7d9a693daaef3 Mon Sep 17 00:00:00 2001 From: disinvite Date: Sun, 12 Nov 2023 19:19:29 -0500 Subject: [PATCH] Cursor::DeleteMatch check and clang fix --- LEGO1/mxhashtable.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/LEGO1/mxhashtable.h b/LEGO1/mxhashtable.h index 16275358..a276cfd8 100644 --- a/LEGO1/mxhashtable.h +++ b/LEGO1/mxhashtable.h @@ -67,8 +67,8 @@ class MxHashTable : protected MxCollection { // on the value of m_resizeOption. Hard to say whether this is how the devs // did it, but a simple cast in either direction doesn't match. union { - MxU32 m_increaseAmount; // +0x20 - double m_increaseFactor; // +0x20 + MxU32 m_increaseAmount; // +0x20 + double m_increaseFactor; // +0x20 }; }; @@ -122,6 +122,8 @@ void MxHashTableCursor::DeleteMatch() { // Cut the matching node out of the linked list // by updating pointer references. + if (m_match == NULL) + return; if (m_match->m_prev) { m_match->m_prev->m_next = m_match->m_next;