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 <stefan@datenfreihafen.org>
Differential Revision: https://phab.enlightenment.org/D11627
This commit is contained in:
Marcel Hollerbach 2020-03-31 10:07:29 +02:00 committed by Stefan Schmidt
parent 455b07ec62
commit b5a4dbc366
1 changed files with 5 additions and 6 deletions

View File

@ -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);
}
}