From 2e0346040a493957005d4856cfb754d5dcf97700 Mon Sep 17 00:00:00 2001 From: deadwood Date: Sun, 12 Jan 2014 11:32:04 +0000 Subject: [PATCH] dos.library: Support NIL: special case in UnLock() git-svn-id: https://svn.aros.org/svn/aros/trunk/AROS@48713 fb15a70f-31f2-0310-bbcc-cdcc74a49acc --- rom/dos/unlock.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/rom/dos/unlock.c b/rom/dos/unlock.c index 5fb068d9c3..19357fa264 100644 --- a/rom/dos/unlock.c +++ b/rom/dos/unlock.c @@ -52,6 +52,14 @@ struct FileLock *fl = BADDR(lock); ASSERT_VALID_PTR_OR_NULL(fl); + + /* Special case for NIL: */ + if (fl && fl->fl_Task == NULL) + { + FreeMem(fl, sizeof(struct FileLock)); + return 0; + } + ASSERT_VALID_FILELOCK(lock); D(bug("UnLock(%x)\n", fl)); -- 2.11.4.GIT