diff options
| -rw-r--r-- | src/object.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/object.c b/src/object.c index 70b9a5c04e..050bb17757 100644 --- a/src/object.c +++ b/src/object.c @@ -251,6 +251,9 @@ void rt_object_init(struct rt_object *object, /* initialize object's parameters */ + /* check object type to avoid re-initialization */ + RT_ASSERT(object->type != (type | RT_Object_Class_Static)); + /* set object type to static */ object->type = type | RT_Object_Class_Static; |
