From fc153004ffb5d21c53bfd7aa7b91d46f7deb39f6 Mon Sep 17 00:00:00 2001 From: qwang12 Date: Sun, 1 Feb 2009 10:05:38 +0000 Subject: The PCD library function will do ASSERT if CallBackFunction is NULL according to Mde Library Specification. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7386 6f19259b-4bc3-4df7-8a09-765794883524 --- MdePkg/Library/PeiPcdLib/PeiPcdLib.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'MdePkg') diff --git a/MdePkg/Library/PeiPcdLib/PeiPcdLib.c b/MdePkg/Library/PeiPcdLib/PeiPcdLib.c index c7aed6dbda..57cf646f6e 100644 --- a/MdePkg/Library/PeiPcdLib/PeiPcdLib.c +++ b/MdePkg/Library/PeiPcdLib/PeiPcdLib.c @@ -869,6 +869,8 @@ LibPcdCallbackOnSet ( { EFI_STATUS Status; + ASSERT (NotificationFunction != NULL); + Status = (GetPcdPpiPointer ())->CallbackOnSet (Guid, TokenNumber, NotificationFunction); ASSERT_EFI_ERROR (Status); @@ -902,6 +904,8 @@ LibPcdCancelCallback ( { EFI_STATUS Status; + ASSERT (NotificationFunction != NULL); + Status = (GetPcdPpiPointer ())->CancelCallback (Guid, TokenNumber, NotificationFunction); ASSERT_EFI_ERROR (Status); -- cgit v1.2.3