Merge "Docs:Fix expired link and typo."
[apps/agl-service-windowmanager.git] / src / wm_layer_control.cpp
index 28d409f..5b801f7 100644 (file)
@@ -278,7 +278,7 @@ void LayerControl::undoUpdate()
 
 WMError LayerControl::loadLayerSetting(const string &path)
 {
-    HMI_DEBUG("loading WMLayer(Application Containers) Setting from %s", path);
+    HMI_DEBUG("loading WMLayer(Application Containers) Setting from %s", path.c_str());
 
     json_object *json_obj, *json_cfg;
     int ret = jh::inputJsonFilie(path.c_str(), &json_obj);
@@ -401,8 +401,11 @@ WMError LayerControl::layoutChange(const WMAction& action)
     if(!action.client->isSourceSizeSet())
     {
         ilmSurfaceProperties sp;
-        ilm_getPropertiesOfSurface(surface, &sp);
-        if((sp.origSourceHeight != sp.sourceHeight) || (sp.origSourceWidth != sp.sourceWidth))
+        if (ILM_SUCCESS != ilm_getPropertiesOfSurface(surface, &sp))
+            return WMError::FAIL;
+
+        if  (sp.origSourceHeight != sp.sourceHeight ||
+             sp.origSourceWidth  != sp.sourceWidth)
         {
             HMI_SEQ_NOTICE(action.req_num, "set source size w:%d h%d", sp.origSourceWidth, sp.origSourceHeight);
             ilm_surfaceSetSourceRectangle(surface, 0, 0, sp.origSourceWidth, sp.origSourceHeight);