From 69343b742ab5c63e5ab45997ce2927809afecc10 Mon Sep 17 00:00:00 2001 From: =?utf8?q?R=C3=A9mi=20Duraffort?= Date: Fri, 5 Feb 2010 12:15:54 +0100 Subject: [PATCH] variables: print an error message when a variable is created without a type (often a typo like the previous commit). --- src/misc/variables.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/misc/variables.c b/src/misc/variables.c index 406c1aade9..ce9f4a9f6c 100644 --- a/src/misc/variables.c +++ b/src/misc/variables.c @@ -276,7 +276,11 @@ int __var_Create( vlc_object_t *p_this, const char *psz_name, int i_type ) break; default: p_var->ops = &void_ops; - break; +#ifndef NDEBUG + if( i_type & VLC_VAR_CLASS != VLC_VAR_VOID ) + msg_Err( p_this, "Creating the variable '%s' without a type", + psz_name ); +#endif } if( i_type & VLC_VAR_DOINHERIT ) -- 2.39.2