DALi Version 1.2.61
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / public-api / image-loader / sync-image-loader.cpp
index 7a8ab3c..e8f8ad7 100644 (file)
@@ -46,7 +46,12 @@ PixelData Load( const std::string& url,
                 bool orientationCorrection )
 {
   // Load the image synchronously (block the thread here).
-  return Dali::LoadImageFromFile( url, dimensions, fittingMode, samplingMode, orientationCorrection );
+  Devel::PixelBuffer pixelBuffer = Dali::LoadImageFromFile( url, dimensions, fittingMode, samplingMode, orientationCorrection );
+  if( pixelBuffer )
+  {
+    return Devel::PixelBuffer::Convert( pixelBuffer );
+  }
+  return Dali::PixelData(); // return empty handle
 }