diff options
author | Jens-Heiner Rechtien <hr@openoffice.org> | 2007-08-03 12:56:25 +0000 |
---|---|---|
committer | Jens-Heiner Rechtien <hr@openoffice.org> | 2007-08-03 12:56:25 +0000 |
commit | f5b3576d56ed77732baec0474399759ed3462ef2 (patch) | |
tree | ccc15a2bcbf9185055c8bba9388c870ff740d189 /basic | |
parent | 15abc2e220ad7bae538c07f22d54af784ee88cd3 (diff) |
INTEGRATION: CWS aquavcl02 (1.9.88); FILE MERGED
2007/07/11 10:48:48 pjanik 1.9.88.2: RESYNC: (1.9-1.10); FILE MERGED
2007/07/06 12:59:04 pl 1.9.88.1: #i79212# fix another menu related crash
Diffstat (limited to 'basic')
-rw-r--r-- | basic/source/app/appedit.cxx | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/basic/source/app/appedit.cxx b/basic/source/app/appedit.cxx index f7b65776e028..1ed25503b975 100644 --- a/basic/source/app/appedit.cxx +++ b/basic/source/app/appedit.cxx @@ -4,9 +4,9 @@ * * $RCSfile: appedit.cxx,v $ * - * $Revision: 1.10 $ + * $Revision: 1.11 $ * - * last change: $Author: hr $ $Date: 2007-06-27 14:12:35 $ + * last change: $Author: hr $ $Date: 2007-08-03 13:56:25 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -216,11 +216,14 @@ long AppEdit::InitMenu( Menu* pMenu ) { AppWin::InitMenu (pMenu ); - USHORT UndoCount = ((TextEdit*)pDataEdit)->aEdit.pTextEngine->GetUndoManager().GetUndoActionCount(); - USHORT RedoCount = ((TextEdit*)pDataEdit)->aEdit.pTextEngine->GetUndoManager().GetRedoActionCount(); + if( pDataEdit ) + { + USHORT UndoCount = ((TextEdit*)pDataEdit)->aEdit.pTextEngine->GetUndoManager().GetUndoActionCount(); + USHORT RedoCount = ((TextEdit*)pDataEdit)->aEdit.pTextEngine->GetUndoManager().GetRedoActionCount(); - pMenu->EnableItem( RID_EDITUNDO, UndoCount > 0 ); - pMenu->EnableItem( RID_EDITREDO, RedoCount > 0 ); + pMenu->EnableItem( RID_EDITUNDO, UndoCount > 0 ); + pMenu->EnableItem( RID_EDITREDO, RedoCount > 0 ); + } return TRUE; } |