Fix regular expressions when used on columns with NULL values

See issue #353.
This commit is contained in:
Martin Kleusberg
2015-06-13 19:00:35 +02:00
parent 0f68c85d4c
commit c9b892879e

View File

@@ -41,7 +41,7 @@ static void regexp(sqlite3_context* ctx, int /*argc*/, sqlite3_value* argv[])
// Get arguments and check their values
QRegExp arg1((const char*)sqlite3_value_text(argv[0]));
QString arg2((const char*)sqlite3_value_text(argv[1]));
if(!arg1.isValid() || arg2.isNull())
if(!arg1.isValid())
return sqlite3_result_error(ctx, "invalid operand", -1);
// Set the pattern matching syntax to a Perl-like one. This is the default in Qt 4.x but Qt 5