[Libreoffice-commits] .: sc/source
Caolán McNamara
caolan at kemper.freedesktop.org
Thu Sep 15 04:51:25 PDT 2011
sc/source/ui/app/inputhdl.cxx | 15 +++++++++------
1 file changed, 9 insertions(+), 6 deletions(-)
New commits:
commit b8fdb51d76ae08b94fd8d9d613b4fc21cedcbe22
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu Sep 15 12:32:51 2011 +0100
Resolves: rhbz#738255 avoid crash on NULL pointer
diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx
index 1524397..c30a8fd 100644
--- a/sc/source/ui/app/inputhdl.cxx
+++ b/sc/source/ui/app/inputhdl.cxx
@@ -2469,13 +2469,16 @@ void ScInputHandler::EnterHandler( sal_uInt8 nBlockMode )
ScDocument* pDoc = pActiveViewSh->GetViewData()->GetDocument();
// #i67990# don't use pLastPattern in EnterHandler
const ScPatternAttr* pPattern = pDoc->GetPattern( aCursorPos.Col(), aCursorPos.Row(), aCursorPos.Tab() );
- SvNumberFormatter* pFormatter = pDoc->GetFormatTable();
- // without conditional format, as in ScColumn::SetString
- sal_uInt32 nFormat = pPattern->GetNumberFormat( pFormatter );
- double nVal;
- if ( pFormatter->IsNumberFormat( aString, nFormat, nVal ) )
+ if (pPattern)
{
- bSpellErrors = false; // ignore the spelling errors
+ SvNumberFormatter* pFormatter = pDoc->GetFormatTable();
+ // without conditional format, as in ScColumn::SetString
+ sal_uInt32 nFormat = pPattern->GetNumberFormat( pFormatter );
+ double nVal;
+ if ( pFormatter->IsNumberFormat( aString, nFormat, nVal ) )
+ {
+ bSpellErrors = false; // ignore the spelling errors
+ }
}
}
}
More information about the Libreoffice-commits
mailing list