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,11 +248,14 @@ namespace
if(nPushFlags)
{
OSL_ENSURE(maPropertyHolders.size(), "PropertyHolders: PUSH with no property holders (!)");
if ( !maPropertyHolders.empty() )
{
PropertyHolder* pNew = new PropertyHolder(*maPropertyHolders.back());
pNew->setPushFlags(nPushFlags);
maPropertyHolders.push_back(pNew);
}
}
}
void Pop()
{
@ -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()