aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/lib/elementary/efl_ui_win.c1
-rw-r--r--src/tests/elementary/elm_test_win.c1
2 files changed, 2 insertions, 0 deletions
diff --git a/src/lib/elementary/efl_ui_win.c b/src/lib/elementary/efl_ui_win.c
index 18e28fa080..b37c1de997 100644
--- a/src/lib/elementary/efl_ui_win.c
+++ b/src/lib/elementary/efl_ui_win.c
@@ -1697,6 +1697,7 @@ elm_win_rotation_set(Evas_Object *obj, int rotation)
EAPI int
elm_win_rotation_get(const Evas_Object *obj)
{
+ EINA_SAFETY_ON_NULL_RETURN_VAL(obj, -1);
return efl_ui_win_rotation_get(obj);
}
diff --git a/src/tests/elementary/elm_test_win.c b/src/tests/elementary/elm_test_win.c
index 92daf1c656..9327327f6e 100644
--- a/src/tests/elementary/elm_test_win.c
+++ b/src/tests/elementary/elm_test_win.c
@@ -459,6 +459,7 @@ EFL_START_TEST(elm_win_test_rotation)
ck_assert_int_eq(elm_win_rotation_get(win), 90);
elm_win_rotation_with_resize_set(win, 180);
ck_assert_int_eq(elm_win_rotation_get(win), 180);
+ ck_assert_int_eq(elm_win_rotation_get(NULL), -1);
}
EFL_END_TEST