GetDefaultPropertyName() can return NULL.
If we try to initialise a std::string with NULL, this causes an exception.
The solution is to just check that the returned value from GetDefaultPropertyName()
and return an empty std::string if it is NULL.
Change-Id: Iecf02228cade112b2922a0fbf0e9cef73a0df13d
Property::Value propValue = detector.GetProperty( DEFAULT_GESTURE_DETECTOR_PROPERTY_START_INDEX );
DALI_TEST_EQUALS( propValue.GetType(), Property::NONE, TEST_LOCATION );
+ DALI_TEST_CHECK( detector.GetPropertyName( DEFAULT_GESTURE_DETECTOR_PROPERTY_START_INDEX ).empty() );
+
// For coverage only, not testable
detector.SetProperty( DEFAULT_GESTURE_DETECTOR_PROPERTY_START_INDEX, true );
if ( index < DEFAULT_PROPERTY_MAX_COUNT )
{
- return GetDefaultPropertyName( index );
+ std::string string;
+
+ const char * propertyName = GetDefaultPropertyName( index );
+ if( propertyName )
+ {
+ string = propertyName;
+ }
+ return string;
}
if ( ( ( index >= PROPERTY_REGISTRATION_START_INDEX ) && ( index <= PROPERTY_REGISTRATION_MAX_INDEX ) )