CWS-TOOLING: integrate CWS os145

This commit is contained in:
Kurt Zenker 2010-11-23 16:56:24 +01:00
commit 12c1007715

View file

@ -248,9 +248,12 @@ namespace
if(nPushFlags)
{
OSL_ENSURE(maPropertyHolders.size(), "PropertyHolders: PUSH with no property holders (!)");
PropertyHolder* pNew = new PropertyHolder(*maPropertyHolders.back());
pNew->setPushFlags(nPushFlags);
maPropertyHolders.push_back(pNew);
if ( !maPropertyHolders.empty() )
{
PropertyHolder* pNew = new PropertyHolder(*maPropertyHolders.back());
pNew->setPushFlags(nPushFlags);
maPropertyHolders.push_back(pNew);
}
}
}
@ -354,8 +357,9 @@ namespace
PropertyHolder& Current()
{
static PropertyHolder aDummy;
OSL_ENSURE(maPropertyHolders.size(), "PropertyHolders: CURRENT with no property holders (!)");
return *maPropertyHolders.back();
return maPropertyHolders.empty() ? aDummy : *maPropertyHolders.back();
}
~PropertyHolders()