From 5c38bef3cf43e651e9635149e3a78023b1a15db8 Mon Sep 17 00:00:00 2001 From: Matthias Hochsteger Date: Tue, 2 Apr 2024 23:34:12 +0200 Subject: [PATCH] Fix initializing empty tables --- libsrc/general/table.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libsrc/general/table.hpp b/libsrc/general/table.hpp index 54f5be31..3c25c2b0 100644 --- a/libsrc/general/table.hpp +++ b/libsrc/general/table.hpp @@ -120,7 +120,7 @@ public: /// Creates fixed maximal element size table inline TABLE (const NgFlatArray & entrysizes) - : BASE_TABLE (NgFlatArray (entrysizes.Size(), const_cast(&entrysizes[BASE])), + : BASE_TABLE (NgFlatArray (entrysizes.Size(), entrysizes.Size() ? const_cast(&entrysizes[BASE]) : nullptr), sizeof(T)) { ; }