idlehomescreen/xmluirendering/renderingplugins/xnvolumecontrolfactory/src/xnvolumecontroladapter.cpp
--- a/idlehomescreen/xmluirendering/renderingplugins/xnvolumecontrolfactory/src/xnvolumecontroladapter.cpp Thu Dec 17 08:40:49 2009 +0200
+++ b/idlehomescreen/xmluirendering/renderingplugins/xnvolumecontrolfactory/src/xnvolumecontroladapter.cpp Thu Jan 07 12:39:41 2010 +0200
@@ -214,10 +214,24 @@
void CXnVolumeControlAdapter::GetRangeL( TInt& aMinimumValue, TInt& aMaximumValue )
{
CXnProperty* minRange = iNode.GetPropertyL( XnPropertyNames::volumecontrol::KMinRange );
- aMinimumValue = static_cast<TInt>( minRange->FloatValueL() );
+ if ( minRange )
+ {
+ aMinimumValue = static_cast<TInt>( minRange->FloatValueL() );
+ }
+ else
+ {
+ aMinimumValue = 1;
+ }
CXnProperty* maxRange = iNode.GetPropertyL( XnPropertyNames::volumecontrol::KMaxRange );
- aMaximumValue = static_cast<TInt>( maxRange->FloatValueL() );
+ if ( maxRange )
+ {
+ aMaximumValue = static_cast<TInt>( maxRange->FloatValueL() );
+ }
+ else
+ {
+ aMaximumValue = aMinimumValue;
+ }
}
// -----------------------------------------------------------------------------
@@ -517,7 +531,12 @@
TInt CXnVolumeControlAdapter::GetCurrentValueL()
{
CXnProperty* valueProperty = iNode.GetPropertyL( XnPropertyNames::action::KValue );
- return static_cast<TInt>( valueProperty->FloatValueL() );
+ TInt retVal( 1 );
+ if ( valueProperty )
+ {
+ retVal = static_cast<TInt>( valueProperty->FloatValueL() );
+ }
+ return retVal;
}
// ----------------------------------------------------------------------------