Kaydet (Commit) 413d46f8 authored tarafından Vladimir Glazounov's avatar Vladimir Glazounov

INTEGRATION: CWS sw022 (1.76.170); FILE MERGED

2003/07/14 10:51:51 hbrinkm 1.76.170.1: #110771# possibly dereferenced NULL-pointer
üst 614505c6
...@@ -2,9 +2,9 @@ ...@@ -2,9 +2,9 @@
* *
* $RCSfile: chardlg.cxx,v $ * $RCSfile: chardlg.cxx,v $
* *
* $Revision: 1.76 $ * $Revision: 1.77 $
* *
* last change: $Author: hr $ $Date: 2003-03-27 15:00:46 $ * last change: $Author: vg $ $Date: 2003-07-21 11:24:25 $
* *
* The Contents of this file are made available subject to the terms of * The Contents of this file are made available subject to the terms of
* either of the following licenses * either of the following licenses
...@@ -858,17 +858,24 @@ const FontList* SvxCharNamePage::GetFontList() const ...@@ -858,17 +858,24 @@ const FontList* SvxCharNamePage::GetFontList() const
SfxObjectShell* pDocSh = SfxObjectShell::Current(); SfxObjectShell* pDocSh = SfxObjectShell::Current();
const SfxPoolItem* pItem; const SfxPoolItem* pItem;
/* #110771# SvxFontListItem::GetFontList can return NULL */
if ( pDocSh && ( pItem = pDocSh->GetItem( SID_ATTR_CHAR_FONTLIST ) ) ) if ( pDocSh && ( pItem = pDocSh->GetItem( SID_ATTR_CHAR_FONTLIST ) ) )
{
m_pImpl->m_pFontList = ( (SvxFontListItem*)pItem )->GetFontList(); m_pImpl->m_pFontList = ( (SvxFontListItem*)pItem )->GetFontList();
else DBG_ASSERT(NULL != m_pImpl->m_pFontList,
"Where is the font list?")
}
if(!m_pImpl->m_pFontList)
{ {
m_pImpl->m_pFontList = new FontList( Application::GetDefaultDevice() ); m_pImpl->m_pFontList =
new FontList( Application::GetDefaultDevice() );
m_pImpl->m_bMustDelete = TRUE; m_pImpl->m_bMustDelete = TRUE;
} }
} }
return m_pImpl->m_pFontList; return m_pImpl->m_pFontList;
} }
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
namespace namespace
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment