diff --git a/shared/looqsquery.cpp b/shared/looqsquery.cpp index a0790fb..eaf647f 100644 --- a/shared/looqsquery.cpp +++ b/shared/looqsquery.cpp @@ -169,6 +169,10 @@ void LooqsQuery::addToken(Token t) * TODO: It's a bit ugly still*/ LooqsQuery LooqsQuery::build(QString expression, TokenType loneWordsTokenType, bool mergeLoneWords) { + if(expression.isEmpty()) + { + return LooqsQuery{}; + } if(!checkParanthesis(expression)) { throw LooqsGeneralException("Invalid paranthesis");