summaryrefslogtreecommitdiff
path: root/xmlhelp/source/cxxhelp/provider/databases.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'xmlhelp/source/cxxhelp/provider/databases.cxx')
-rw-r--r--xmlhelp/source/cxxhelp/provider/databases.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/xmlhelp/source/cxxhelp/provider/databases.cxx b/xmlhelp/source/cxxhelp/provider/databases.cxx
index e4ab2e199b..a03f501c64 100644
--- a/xmlhelp/source/cxxhelp/provider/databases.cxx
+++ b/xmlhelp/source/cxxhelp/provider/databases.cxx
@@ -802,6 +802,10 @@ void KeywordInfo::KeywordElement::init( Databases *pDatabases,Db* pDb,const rtl:
for( sal_uInt32 i = 0; i < id.size(); ++i )
{
+ // the following object must live longer than the
+ // pointer returned by aDBData.getData()
+ DBData aDBData;
+
listId[i] = id[i];
listAnchor[i] = anchor[i];
@@ -813,7 +817,6 @@ void KeywordInfo::KeywordElement::init( Databases *pDatabases,Db* pDb,const rtl:
DBHelp* pDBHelp = pDb->getDBHelp();
if( pDBHelp != NULL )
{
- DBData aDBData;
bool bSuccess = pDBHelp->getValueForKey( idi, aDBData );
if( bSuccess )
{