X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b7aaabf86f350185bf99dee49c1d4573a5236eaa..9cf99fc093f9c45b6b5d8d8b357699d826c9916a:/src/common/hash.cpp?ds=inline diff --git a/src/common/hash.cpp b/src/common/hash.cpp index d8079dce9e..2909e48183 100644 --- a/src/common/hash.cpp +++ b/src/common/hash.cpp @@ -395,7 +395,7 @@ void wxHashTable::Put (long key, long value, wxObject * object) if (!hash_table[position]) { - hash_table[position] = new wxList (wxKEY_INTEGER); + hash_table[position] = new wxList (wxKEY_STRING); if (m_deleteContents) hash_table[position]->DeleteContents(TRUE); } @@ -681,11 +681,14 @@ void wxHashTable::DeleteContents (bool flag) void wxHashTable::Clear () { - int i; - for (i = 0; i < n; i++) + int i; + if (hash_table) { - if (hash_table[i]) - hash_table[i]->Clear (); + for (i = 0; i < n; i++) + { + if (hash_table[i]) + hash_table[i]->Clear (); + } } m_count = 0; }