--- ext/icu/icu.c.orig 2009-12-16 15:43:51.000000000 -0800 +++ ext/icu/icu.c 2009-12-15 15:23:34.000000000 -0800 @@ -250,12 +250,12 @@ UErrorCode status = U_ZERO_ERROR; URegularExpression *pExpr; UBool res; - const UChar *zString = sqlite3_value_text16(apArg[1]); + const UChar *zString; /* If the left hand side of the regexp operator is NULL, ** then the result is also NULL. */ - if( !zString ){ + if( nArg<2 || !(zString=sqlite3_value_text16(apArg[1])) ){ return; }