summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcel Hollerbach <mail@marcel-hollerbach.de>2020-03-31 10:07:29 +0200
committerStefan Schmidt <s.schmidt@samsung.com>2020-03-31 13:07:47 +0200
commitf488b3920d22aa4c90de73bbff368af1fe4d3588 (patch)
tree2f4c1b5c01e834c4ca7aae5656995598a8857e90
parentee800e6f2459acf0c2154c9abc522f3dd28fb034 (diff)
downloadefl-devs/stefan/exactness-preload.tar.gz
exactness: error when _src_unit is NULLdevs/stefan/exactness-preload
if _src_unit is NULL, the write here would delete the actions, with this commit we ensure that this is printing an error. Differential Revision: https://phab.enlightenment.org/D11627
-rw-r--r--src/bin/exactness/player.c11
1 files 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);
}
}