From 917627b004b5b75147782386daa2a203ab7cc5d4 Mon Sep 17 00:00:00 2001 From: Stefan Schmidt Date: Fri, 17 Apr 2020 14:34:21 +0200 Subject: [PATCH] exactness: do not access potential NULL pointer These to code lines should be in one block and not one exectued without the if. CID: 1422198 Reviewed-by: Marcel Hollerbach Differential Revision: https://phab.enlightenment.org/D11726 --- src/bin/exactness/player.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/bin/exactness/player.c b/src/bin/exactness/player.c index 2dcf3f5e59..a3d6b04880 100644 --- a/src/bin/exactness/player.c +++ b/src/bin/exactness/player.c @@ -1014,8 +1014,11 @@ _write_unit_file(void) 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; + if (_src_type == FTYPE_EXU) + { + tmp = exactness_unit_file_read(_src_filename); + _dest_unit->actions = tmp->actions; + } exactness_unit_file_write(_dest_unit, _dest); } } -- 2.34.1