[vlc-devel] commit: Do not duplicate NULL strings ( Rafaël Carré )

git version control git at videolan.org
Mon May 5 09:51:21 CEST 2008


vlc | branch: master | Rafaël Carré <funman at videolan.org> | Mon May  5 09:41:20 2008 +0200| [32edee83adbf9c1a9513d9f2da5009747ce732ea]

Do not duplicate NULL strings

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=32edee83adbf9c1a9513d9f2da5009747ce732ea
---

 src/text/unicode.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/src/text/unicode.c b/src/text/unicode.c
index 87e30ec..16c5a5f 100644
--- a/src/text/unicode.c
+++ b/src/text/unicode.c
@@ -165,6 +165,8 @@ static char *locale_fast (const char *string, bool from)
 
 static inline char *locale_dup (const char *string, bool from)
 {
+    assert( string );
+
 #if defined (USE_ICONV)
     if (find_charset ())
         return strdup (string);




More information about the vlc-devel mailing list