INTEGRATION: CWS impress73 (1.15.24); FILE MERGED

2005/10/19 12:09:53 af 1.15.24.1: #124366# Checking for NULL pointer in GetSelectedAutoLayout().
This commit is contained in:
Rüdiger Timm 2005-11-08 08:05:10 +00:00
parent fb0824a843
commit 15bcaeee41

View file

@ -4,9 +4,9 @@
*
* $RCSfile: LayoutMenu.cxx,v $
*
* $Revision: 1.15 $
* $Revision: 1.16 $
*
* last change: $Author: hr $ $Date: 2005-09-23 11:31:32 $
* last change: $Author: rt $ $Date: 2005-11-08 09:05:10 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@ -309,7 +309,16 @@ String LayoutMenu::GetSelectedLayoutName (void)
AutoLayout LayoutMenu::GetSelectedAutoLayout (void)
{
return *static_cast<AutoLayout*>(GetItemData(GetSelectItemId()));
AutoLayout aResult = AUTOLAYOUT_NONE;
if ( ! IsNoSelection() && GetSelectItemId()!=0)
{
AutoLayout* pLayout = static_cast<AutoLayout*>(GetItemData(GetSelectItemId()));
if (pLayout != NULL)
aResult = *pLayout;
}
return aResult;
}