summaryrefslogtreecommitdiff
path: root/fpicker
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2016-10-31 13:03:24 +0100
committerStephan Bergmann <sbergman@redhat.com>2016-10-31 13:22:06 +0100
commit074defe26f55ef05ca5bd45f292e736438654b47 (patch)
treea7964ca26212f9afbfd225652db071e093f04d9a /fpicker
parenta24105a8927c9450088fe950cf6bb88adf225614 (diff)
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
Diffstat (limited to 'fpicker')
-rw-r--r--fpicker/source/aqua/FilterHelper.mm4
1 files 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;
}