From 074defe26f55ef05ca5bd45f292e736438654b47 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Mon, 31 Oct 2016 13:03:24 +0100 Subject: [PATCH] Strange OUString null check ...ever since 035d20bd248b4f958c185001752688ef88318af6 "INTEGRATION: CWS aquafilepicker01". Unclear whether this was written under the assumption that m_aCurrentFilter is a pointer (which would explain the OSL_TRACE message talking about "null"), or whether it really wanted to check for an empty string (which the code acutally happened to do). So lets keep the empty-string check in, given it was in there ever since the code's introduction in 2007. Change-Id: I9e48b6ceccaf069c6a6a88d3918ba88379a72497 --- fpicker/source/aqua/FilterHelper.mm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fpicker/source/aqua/FilterHelper.mm b/fpicker/source/aqua/FilterHelper.mm index c539fd64fae0..3d04fd5c4ebe 100644 --- a/fpicker/source/aqua/FilterHelper.mm +++ b/fpicker/source/aqua/FilterHelper.mm @@ -342,8 +342,8 @@ throw (css::lang::IllegalArgumentException, css::uno::RuntimeException) bool FilterHelper::filenameMatchesFilter(NSString* sFilename) { - if (m_aCurrentFilter == nullptr) { - OSL_TRACE("filter name is null"); + if (m_aCurrentFilter.isEmpty()) { + OSL_TRACE("filter name is empty"); return true; }