Browse Source

meta: scoped assert

skypjack 1 month ago
parent
commit
0ef6295f26
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/entt/meta/meta.hpp

+ 1 - 1
src/entt/meta/meta.hpp

@@ -219,9 +219,9 @@ class meta_any {
         if(node == nullptr) {
         if(node == nullptr) {
             ENTT_ASSERT(*this, "Invalid vtable function");
             ENTT_ASSERT(*this, "Invalid vtable function");
             vtable(internal::meta_traits::is_none, *this, nullptr);
             vtable(internal::meta_traits::is_none, *this, nullptr);
+            ENTT_ASSERT(node != nullptr, "Invalid pointer to node");
         }
         }
 
 
-        ENTT_ASSERT(node != nullptr, "Invalid pointer to node");
         return *node;
         return *node;
     }
     }