summaryrefslogtreecommitdiff
path: root/src/lib/ecore_evas
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2018-12-03 15:50:02 +0000
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2018-12-03 15:50:02 +0000
commit2dc4bed587040a62537b21458e3e2d953fd15140 (patch)
tree9086380f1040d2198e635918f8b699fce609f0b0 /src/lib/ecore_evas
parent3c9123f17063a4342858d1daba507e9776a80a69 (diff)
ecore evas - buffer - init ecore event evas as many times as shutdown
so ecore_event_evas_shutdown() was getting called much more than ecore_event_evas_init() - missing an init in the ee + img obj creator in ecore evas. this adds it in and ensures in allocation failures we dont over-init or shutdown too. @fix
Diffstat (limited to 'src/lib/ecore_evas')
-rw-r--r--src/lib/ecore_evas/ecore_evas_buffer.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/lib/ecore_evas/ecore_evas_buffer.c b/src/lib/ecore_evas/ecore_evas_buffer.c
index 173f33289f..8fea11a9f3 100644
--- a/src/lib/ecore_evas/ecore_evas_buffer.c
+++ b/src/lib/ecore_evas/ecore_evas_buffer.c
@@ -20,6 +20,7 @@ _ecore_evas_buffer_free(Ecore_Evas *ee)
20{ 20{
21 Ecore_Evas_Engine_Buffer_Data *bdata = ee->engine.data; 21 Ecore_Evas_Engine_Buffer_Data *bdata = ee->engine.data;
22 22
23 if (!bdata) return;
23 if (bdata->image) 24 if (bdata->image)
24 { 25 {
25 Ecore_Evas *ee2; 26 Ecore_Evas *ee2;
@@ -31,11 +32,11 @@ _ecore_evas_buffer_free(Ecore_Evas *ee)
31 } 32 }
32 else 33 else
33 { 34 {
34 bdata->free_func(bdata->data, 35 bdata->free_func(bdata->data, bdata->pixels);
35 bdata->pixels);
36 } 36 }
37 37
38 free(bdata); 38 free(bdata);
39 ee->engine.data = NULL;
39 40
40 ecore_event_evas_shutdown(); 41 ecore_event_evas_shutdown();
41} 42}
@@ -895,6 +896,8 @@ ecore_evas_buffer_new(int w, int h)
895 ee = ecore_evas_buffer_allocfunc_new 896 ee = ecore_evas_buffer_allocfunc_new
896 (w, h, _ecore_evas_buffer_pix_alloc, _ecore_evas_buffer_pix_free, NULL); 897 (w, h, _ecore_evas_buffer_pix_alloc, _ecore_evas_buffer_pix_free, NULL);
897 898
899 if (!ee) ecore_event_evas_shutdown();
900
898 ecore_evas_done(ee, EINA_TRUE); 901 ecore_evas_done(ee, EINA_TRUE);
899 902
900 return ee; 903 return ee;
@@ -1084,5 +1087,6 @@ ecore_evas_object_image_new(Ecore_Evas *ee_target)
1084 } 1087 }
1085 1088
1086 _ecore_evas_subregister(ee_target, ee); 1089 _ecore_evas_subregister(ee_target, ee);
1090 ecore_event_evas_init();
1087 return o; 1091 return o;
1088} 1092}