summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Martitz <kugel@rockbox.org>2014-03-15 02:23:43 +0100
committerThomas Martitz <kugel@rockbox.org>2014-03-15 02:23:43 +0100
commit915bc0999676b1d42f8c9dd57e5911931cd34fcd (patch)
tree8d53c245442142c1f9edd59af802f237c52e1b99
parent361aa9263d51dcd3f8951b0da31aba77758726a9 (diff)
downloadrockbox-915bc09.tar.gz
rockbox-915bc09.tar.bz2
rockbox-915bc09.zip
Fix stupid typo in 470989b that triggered panics easily.
Change-Id: Ic998a0ea93141a5399e28dc286eea4e3d40663d6
-rw-r--r--firmware/events.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/firmware/events.c b/firmware/events.c
index 4a51e7ae87..3386c02465 100644
--- a/firmware/events.c
+++ b/firmware/events.c
@@ -49,7 +49,7 @@ static bool do_add_event(unsigned short id, bool oneshot, bool user_data_valid,
for (i = 0; i < MAX_SYS_EVENTS; i++)
{
if (events[i].handler.callback == handler && events[i].id == id
- && (!user_data_valid || (user_data == events[i].handler.callback)))
+ && (!user_data_valid || (user_data == events[i].handler.user_data)))
return false;
}
@@ -89,7 +89,7 @@ void do_remove_event(unsigned short id, bool user_data_valid,
for (i = 0; i < MAX_SYS_EVENTS; i++)
{
if (events[i].id == id && events[i].handler.callback == handler
- && (!user_data_valid || (user_data == events[i].handler.callback)))
+ && (!user_data_valid || (user_data == events[i].handler.user_data)))
{
events[i].handler.callback = NULL;
return;