summaryrefslogtreecommitdiff
path: root/src/core/templates.h
diff options
context:
space:
mode:
authorNikolay Korolev <nickvnuk@gmail.com>2020-04-20 01:04:57 +0300
committerNikolay Korolev <nickvnuk@gmail.com>2020-04-20 01:04:57 +0300
commit7e4c68382416229cf0a58637bd9f308a6def1caa (patch)
tree61be1bbcb1242293639c1ad5a4ce3e3e72aea271 /src/core/templates.h
parentdf376a13ea8dac7ecff2aabe7d715774bcc7c294 (diff)
fixes
Diffstat (limited to 'src/core/templates.h')
-rw-r--r--src/core/templates.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/core/templates.h b/src/core/templates.h
index a1627357..51a24e4c 100644
--- a/src/core/templates.h
+++ b/src/core/templates.h
@@ -104,6 +104,10 @@ public:
return m_flags[i].free ? nil : (T*)&m_entries[i];
}
T *GetAt(int handle){
+#ifdef FIX_BUGS
+ if (handle == -1)
+ return nil;
+#endif
return m_flags[handle>>8].u == (handle & 0xFF) ?
(T*)&m_entries[handle >> 8] : nil;
}