Commit 166dc5d2 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

vlc_object_create: assert that the object type is known

parent 219e1dea
...@@ -263,8 +263,8 @@ void * __vlc_object_create( vlc_object_t *p_this, int i_type ) ...@@ -263,8 +263,8 @@ void * __vlc_object_create( vlc_object_t *p_this, int i_type )
psz_type = "announce"; psz_type = "announce";
break; break;
default: default:
i_size = i_type > (int)sizeof(vlc_object_t) assert( i_type > 0 ); /* unknown type?! */
? i_type : (int)sizeof(vlc_object_t); i_size = i_type;
i_type = VLC_OBJECT_GENERIC; i_type = VLC_OBJECT_GENERIC;
psz_type = "generic"; psz_type = "generic";
break; break;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment