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
This commit is contained in:
Stephan Bergmann 2016-10-31 13:03:24 +01:00
parent a24105a892
commit 074defe26f

View File

@ -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;
}