jpeg pushed a commit to branch master. http://git.enlightenment.org/core/elementary.git/commit/?id=8db552511bb7fb7db52b88a490d8e53cfc370703
commit 8db552511bb7fb7db52b88a490d8e53cfc370703 Author: Jean-Philippe Andre <jp.an...@samsung.com> Date: Wed Oct 14 18:00:24 2015 +0900 elm_test: Fix bug in GLView test Scenario: const char * accel = accel_get(); accel_set("gl:depth"); Now accel may not be valid anymore since the original Eina_Stringshare might have been destroyed. So there was no point in saving the const char * pointer. It was not valid after the call to set(). This is a bit confusing here. Returning char* would be clear: the caller would own the data. --- src/bin/test_glview.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/bin/test_glview.c b/src/bin/test_glview.c index ceaf7cc..31c76cf 100644 --- a/src/bin/test_glview.c +++ b/src/bin/test_glview.c @@ -624,7 +624,7 @@ test_glview(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_in gldata_init(gld); // add a Z-depth buffer to the window and try to use GL - accel = elm_config_accel_preference_get(); + accel = eina_stringshare_add(elm_config_accel_preference_get()); elm_config_accel_preference_set("gl:depth"); // new window - do the usual and give it a name, title and delete handler @@ -633,6 +633,7 @@ test_glview(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_in // restore previous accel preference elm_config_accel_preference_set(accel); + eina_stringshare_del(accel); bx = elm_box_add(win); evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); --