diff options
author | William Wilgus <wilgus.william@gmail.com> | 2022-10-15 09:08:09 -0400 |
---|---|---|
committer | William Wilgus <me.theuser@yahoo.com> | 2022-10-15 09:26:58 -0400 |
commit | 12ef045fdf5a9e2b4d5618cc3b7ba50ecc0ccf69 (patch) | |
tree | b4885951a5cba1b78c21b30ce37a1d6f1574aa5f /apps/action.c | |
parent | 9d3d925295112a0080bc1d70fad170db9e1af2a9 (diff) | |
download | rockbox-12ef045fdf5a9e2b4d5618cc3b7ba50ecc0ccf69.tar.gz rockbox-12ef045fdf5a9e2b4d5618cc3b7ba50ecc0ccf69.zip |
move buflib_free invalid handle check to the function
allow buflib_free to check for invalid or already freed handles
within the function -- remove all the invalid handle guards thru core_free
Change-Id: Ibdcbc82760fc93b674c42283fca420d94907df8e
Diffstat (limited to 'apps/action.c')
-rw-r--r-- | apps/action.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/apps/action.c b/apps/action.c index da08e29dbb..8c03ca4d65 100644 --- a/apps/action.c +++ b/apps/action.c | |||
@@ -1219,8 +1219,7 @@ int action_set_keymap_handle(int handle, int count) | |||
1219 | return -1; | 1219 | return -1; |
1220 | #else | 1220 | #else |
1221 | /* free an existing remap */ | 1221 | /* free an existing remap */ |
1222 | if (action_last.key_remap > 0) | 1222 | action_last.key_remap = core_free(action_last.key_remap); |
1223 | action_last.key_remap = core_free(action_last.key_remap); | ||
1224 | 1223 | ||
1225 | /* if clearing the remap, we're done */ | 1224 | /* if clearing the remap, we're done */ |
1226 | if (count <= 0 || handle <= 0) | 1225 | if (count <= 0 || handle <= 0) |