Commit 5bbfdd88 authored by Hugo Pereira Da Costa's avatar Hugo Pereira Da Costa
Browse files

Properly initialize GMatchInfo to 0L before parsing regular expression

This prevents crash when parsing the result later on, when the regexp matching has failed (for some reason) in the first place.

parent fc2ddd34
......@@ -78,7 +78,7 @@ namespace Oxygen
G_REGEX_CASELESS, (GRegexMatchFlags)0, 0L );
GMatchInfo* matchInfo;
GMatchInfo* matchInfo(0L);
g_regex_match( regex, value.c_str(), (GRegexMatchFlags)0, &matchInfo);
const int matchCount( g_match_info_get_match_count( matchInfo ) );
if( matchCount == 2 )
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment