diff -r 84a49a6f37db -r f255342d132f core/sm_stringutil.cpp --- a/core/sm_stringutil.cpp Mon Feb 26 07:44:08 2007 +0000 +++ b/core/sm_stringutil.cpp Mon Feb 26 08:21:09 2007 +0000 @@ -660,7 +660,12 @@ { CHECK_ARGS(0); char *str; - pCtx->LocalToString(params[arg], &str); + int err; + if ((err=pCtx->LocalToString(params[arg], &str)) != SP_ERROR_NONE) + { + pCtx->ThrowNativeErrorEx(err, "Could not deference string"); + return 0; + } AddString(&buf_p, llen, str, width, prec); arg++; break;