ecore/audio: add ERR messages when trying to overwrite existing vio
authorMike Blumenkrantz <zmike@samsung.com>
Tue, 17 Mar 2020 16:02:23 +0000 (12:02 -0400)
committerJongmin Lee <jm105.lee@samsung.com>
Thu, 26 Mar 2020 21:03:19 +0000 (06:03 +0900)
this probably causes a crash or a leak at some point

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D11526

src/lib/ecore_audio/ecore_audio_obj_in.c
src/lib/ecore_audio/ecore_audio_obj_out.c

index b2a8f91..dcb792c 100644 (file)
@@ -155,7 +155,10 @@ _ecore_audio_in_ecore_audio_vio_set(Eo *eo_obj, Ecore_Audio_Input *obj, Ecore_Au
   Ecore_Audio_Object *ea_obj = efl_data_scope_get(eo_obj, ECORE_AUDIO_CLASS);
 
   if (ea_obj->vio)
-    _free_vio(ea_obj);
+    {
+       ERR("VIO already set!");
+       _free_vio(ea_obj);
+    }
 
   obj->seekable = obj->seekable_prev;
 
index 7e1d39b..4c05b21 100644 (file)
@@ -118,7 +118,10 @@ _ecore_audio_out_ecore_audio_vio_set(Eo *eo_obj, Ecore_Audio_Output *_pd EINA_UN
   Ecore_Audio_Object *ea_obj = efl_data_scope_get(eo_obj, ECORE_AUDIO_CLASS);
 
   if (ea_obj->vio)
-    _free_vio(ea_obj);
+    {
+       ERR("VIO already set!");
+       _free_vio(ea_obj);
+    }
 
   if (!vio)
     return;