diff options
Diffstat (limited to 'Ivy')
-rw-r--r-- | Ivy/IvyApplication.cxx | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/Ivy/IvyApplication.cxx b/Ivy/IvyApplication.cxx index 91a2d98..7ed553c 100644 --- a/Ivy/IvyApplication.cxx +++ b/Ivy/IvyApplication.cxx @@ -346,7 +346,12 @@ int IvyApplication::SendMsg(const char *message) {
ivy::string buffer;
const char **substring;
- pcre_get_substring_list(message,ovector, match_count, &substring);
+ int err = pcre_get_substring_list(message,ovector, match_count, &substring);
+ if ( err != 0 )
+ {
+ SendMsg( Error, Error, "Memory Alloc Error" );
+ }
+ else {
for ( int j = 1; j < match_count; j++ )
{
buffer += substring[j];
@@ -355,6 +360,7 @@ int IvyApplication::SendMsg(const char *message) pcre_free_substring_list(substring);
SendMsg( Msg, i, buffer.c_str() );
count++;
+ }
}
#else
if ( exp && exp->Match( message ) )
|