[PROTO] cherry pick from tizen_2.2
authorNikita Kalyazin <n.kalyazin@samsung.com>
Mon, 2 Sep 2013 09:13:25 +0000 (13:13 +0400)
committerNikita Kalyazin <n.kalyazin@samsung.com>
Mon, 2 Sep 2013 09:13:25 +0000 (13:13 +0400)
Original commit:
12afa1216d6bf505a6d88f6b8f0f2145fed7701f fix prevent violation

Change-Id: Ia86f422e5a2d56fbe7a27c63c8b91f9144523212

helper/dacapture.c
probe_event/da_event.c

index 7b08278..0739fc7 100755 (executable)
@@ -266,8 +266,7 @@ static Evas* create_canvas(int width, int height)
 
        // ARGB32 is sizeof(int), that is 4 bytes, per pixel
        pixels = malloc(width * height * sizeof(int));
-       if(unlikely(pixels == NULL))
-       {
+       if (unlikely(pixels == NULL)) {
                // ERROR: could not allocate canvas pixels!
                evas_free(canvas);
                return NULL;
@@ -280,7 +279,11 @@ static Evas* create_canvas(int width, int height)
        einfo->info.alpha_threshold = 0;
        einfo->info.func.new_update_region = NULL;
        einfo->info.func.free_update_region = NULL;
-       evas_engine_info_set(canvas, (Evas_Engine_Info*)einfo);
+       if (unlikely(evas_engine_info_set(canvas,(Evas_Engine_Info*)einfo) == EINA_FALSE)) {
+               PRINTMSG("ERROR: could not set evas engine info!\n");
+               evas_free(canvas);
+               return NULL;
+       }
 
        return canvas;
 }
index 1538bd2..c04b9e5 100755 (executable)
@@ -83,8 +83,11 @@ void on_orientation_changed(int angle, bool capi)
        probeBlockStart();
 
        internal_angle = angle;
-       runtime_info_get_value_bool(
-                       RUNTIME_INFO_KEY_AUTO_ROTATION_ENABLED, &autoRotation);
+       if(runtime_info_get_value_bool(
+                       RUNTIME_INFO_KEY_AUTO_ROTATION_ENABLED, &autoRotation) < 0)
+       {
+               PRINTMSG("ERROR: could not get auto rotation value!\n");
+       }
 
        if(autoRotation)        // rotation is not locked
        {