From f33cc936d56a5a004f9c9a40a6ff73a7635aca45 Mon Sep 17 00:00:00 2001 From: fcolin Date: Mon, 9 Nov 2009 10:25:50 +0000 Subject: coorection plantage si erreur de compile exp reguliere --- src/ivybind.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/ivybind.c') diff --git a/src/ivybind.c b/src/ivybind.c index 1886d03..d433d1a 100644 --- a/src/ivybind.c +++ b/src/ivybind.c @@ -140,6 +140,7 @@ void IvyBindingFree( IvyBinding bind ) /* if ((called %1000) == 0) { */ /* printf ("DBG> IvyBindingFree called =%d\n", called); */ /* } */ + if( bind == NULL ) return; #ifdef USE_PCRE_REGEX if ( bind->ovector != NULL ) free( bind->ovector ); @@ -157,6 +158,7 @@ void IvyBindingFree( IvyBinding bind ) int IvyBindingExec( IvyBinding bind, const char * message ) { int nb_match = 0; + if( bind == NULL ) return nb_match; #ifdef USE_PCRE_REGEX nb_match = pcre_exec( @@ -189,6 +191,7 @@ int IvyBindingExec( IvyBinding bind, const char * message ) void IvyBindingMatch( IvyBinding bind, const char *message, int argnum, int *arglen, const char **arg) { + if( bind == NULL ) return; #ifdef USE_PCRE_REGEX *arglen = bind->ovector[2*argnum+1]- bind->ovector[2*argnum]; -- cgit v1.1