summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2012-03-10 19:58:39 +0100
committerJulien Nabet <serval2412@yahoo.fr>2012-03-10 19:58:39 +0100
commitc604a738f48ffa4c12f7c9801d03a146303d3123 (patch)
tree35c7030fafe9b47825e8bdb06f273176185bd5b4
parent638f68e68a1810ba3a3cd603c509745360b2ef8d (diff)
Fix Possible null pointer dereference
-rw-r--r--sc/source/ui/vba/vbarange.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/sc/source/ui/vba/vbarange.cxx b/sc/source/ui/vba/vbarange.cxx
index 6ae2d0820d21..d8c3a9fc75ee 100644
--- a/sc/source/ui/vba/vbarange.cxx
+++ b/sc/source/ui/vba/vbarange.cxx
@@ -4527,10 +4527,10 @@ ScVbaRange::AutoFilter( const uno::Any& Field, const uno::Any& Criteria1, const
if ( xCurrent.is() )
{
ScVbaRange* pRange = getImplementation( xCurrent );
- if ( pRange->isSingleCellRange() )
- throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Can't create AutoFilter") ), uno::Reference< uno::XInterface >() );
if ( pRange )
{
+ if ( pRange->isSingleCellRange() )
+ throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Can't create AutoFilter") ), uno::Reference< uno::XInterface >() );
RangeHelper currentRegion( pRange->mxRange );
autoFiltAddress = currentRegion.getCellRangeAddressable()->getRangeAddress();
}