< Prevent message >
Dereference null return value (NULL_RETURNS)
Signed-off-by: suhyung Eom <suhyung.eom@samsung.com>
Change-Id: Id84d90dcb1adca17b3fdc4f3b01ac86748306eab
- Vector2 size( Stage::GetCurrent()->GetSize() );
- viewPort.x = viewPort.y = 0;
- viewPort.width = size.width;
- viewPort.height = size.height;
+ Internal::Stage* stage = Internal::Stage::GetCurrent();
+ if ( stage )
+ {
+ Vector2 size( stage->GetSize() );
+ viewPort.x = viewPort.y = 0;
+ viewPort.width = size.width;
+ viewPort.height = size.height;
+ }
{
// Copy properties to associated scenegraph mesh
SceneGraph::Mesh* mesh(mResourceManager.GetMesh(mMeshId));
{
// Copy properties to associated scenegraph mesh
SceneGraph::Mesh* mesh(mResourceManager.GetMesh(mMeshId));
+ DALI_ASSERT_DEBUG( mesh );
// TODO: Should be double buffered - pass in buffer index
MeshData& meshData = mesh->GetMeshData(Mesh::UPDATE_THREAD);
// TODO: Should be double buffered - pass in buffer index
MeshData& meshData = mesh->GetMeshData(Mesh::UPDATE_THREAD);
{
const SizeType wholeAllocation = sizeof(SizeType) * 2u + capacity * elementSize;
void* wholeData = (void*)malloc( wholeAllocation );
{
const SizeType wholeAllocation = sizeof(SizeType) * 2u + capacity * elementSize;
void* wholeData = (void*)malloc( wholeAllocation );
+ DALI_ASSERT_ALWAYS( wholeData && "VectorBase::Reserve - Memory allocation failed" );
+
#if defined( DEBUG_ENABLED )
// in debug build this will help identify a vector of uninitialized data
memset( wholeData, 0xaa, wholeAllocation );
#if defined( DEBUG_ENABLED )
// in debug build this will help identify a vector of uninitialized data
memset( wholeData, 0xaa, wholeAllocation );
ObjectRegistry Stage::GetObjectRegistry() const
{
ObjectRegistry Stage::GetObjectRegistry() const
{
- Internal::ObjectRegistry& internal = Internal::Stage::GetCurrent()->GetObjectRegistry();
+ Internal::Stage* stage = Internal::Stage::GetCurrent();
+ DALI_ASSERT_ALWAYS( stage && "GetObjectRegistry() : Stage is null" );
+ Internal::ObjectRegistry& internal = stage->GetObjectRegistry();
return ObjectRegistry(&internal);
}
return ObjectRegistry(&internal);
}
{
Internal::BufferImage* internal = new Internal::BufferImage(1,1,Pixel::RGBA8888, Dali::Image::NEVER);
PixelBuffer* pBuf = internal->GetBuffer();
{
Internal::BufferImage* internal = new Internal::BufferImage(1,1,Pixel::RGBA8888, Dali::Image::NEVER);
PixelBuffer* pBuf = internal->GetBuffer();
- pBuf[0] = pBuf[1] = pBuf[2] = pBuf[3] = 0xFF;
+ if ( pBuf )
+ {
+ pBuf[0] = pBuf[1] = pBuf[2] = pBuf[3] = 0xFF;
+ }
return BufferImage(internal);
}
return BufferImage(internal);
}
if( Property::MAP == GetType() )
{
Property::Map *container = AnyCast<Property::Map>(&(mImpl->mValue));
if( Property::MAP == GetType() )
{
Property::Map *container = AnyCast<Property::Map>(&(mImpl->mValue));
- if( index < static_cast<int>(container->Count()) )
+ if( container && index < static_cast<int>(container->Count()) )
{
key = container->GetKey( index );
}
{
key = container->GetKey( index );
}