Since LifecycleController could be called first before Model / ModelCache destroy,
re-create the image resource cache at terminate time was possible.
Since we don't check the validation of this item, it will make crash.
So let we ensure that we call those API under same thread with adaptor.
Change-Id: I995c509f070b56f99214689e5a9f3e66514d5f91
Signed-off-by: Eunki, Hong <eunkiki.hong@samsung.com>
Dali::Texture GetCachedTexture(Dali::PixelData pixelData, bool mipmapRequired)
{
- if(SupportPixelDataCache(pixelData))
+ if(Dali::Adaptor::IsAvailable() && SupportPixelDataCache(pixelData))
{
return GetCacheImpl()->GetOrCreateCachedTexture(pixelData, mipmapRequired);
}
void RequestGarbageCollect(bool fullCollect)
{
- GetCacheImpl()->RequestGarbageCollect(fullCollect);
+ if(DALI_LIKELY(Dali::Adaptor::IsAvailable()))
+ {
+ GetCacheImpl()->RequestGarbageCollect(fullCollect);
+ }
}
void EnsureResourceLoaderCreated()
{
- GetCacheImpl();
+ if(DALI_LIKELY(Dali::Adaptor::IsAvailable()))
+ {
+ GetCacheImpl();
+ }
}
// Can be called by worker thread.