stefan pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=b5a4dbc3667e2771c8e27257f7705422e8fd8fde

commit b5a4dbc3667e2771c8e27257f7705422e8fd8fde
Author: Marcel Hollerbach <[email protected]>
Date:   Tue Mar 31 10:07:29 2020 +0200

    exactness: error when _src_unit is NULL
    
    if _src_unit is NULL, the write here would delete the actions, with this
    commit we ensure that this is printing an error.
    
    Reviewed-by: Stefan Schmidt <[email protected]>
    Differential Revision: https://phab.enlightenment.org/D11627
---
 src/bin/exactness/player.c | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/src/bin/exactness/player.c b/src/bin/exactness/player.c
index 47c83927e8..1240070f37 100644
--- a/src/bin/exactness/player.c
+++ b/src/bin/exactness/player.c
@@ -1010,12 +1010,11 @@ _write_unit_file(void)
 {
    if (_dest && _dest_unit && _ready_to_write)
      {
-        if (_src_unit)
-          {
-             Exactness_Unit *tmp = NULL;
-             if (_src_type == FTYPE_EXU) tmp = 
exactness_unit_file_read(_src_filename);
-             _dest_unit->actions = tmp->actions;
-          }
+        Exactness_Unit *tmp = NULL;
+
+        EINA_SAFETY_ON_NULL_RETURN(_src_unit);
+        if (_src_type == FTYPE_EXU) tmp = 
exactness_unit_file_read(_src_filename);
+          _dest_unit->actions = tmp->actions;
         exactness_unit_file_write(_dest_unit, _dest);
      }
 }

-- 


Reply via email to