Merge pull request #1307 from lioncash/null2
sm/notifications: Prevent potential null pointer dereference in ReceiveNotification
This commit is contained in:
commit
31dae90dcd
@ -101,7 +101,7 @@ Result ReceiveNotification(SessionData *sessionData, u32 *notificationId)
|
||||
|
||||
if(processData == NULL || !processData->notificationEnabled || processData->nbPendingNotifications == 0)
|
||||
{
|
||||
if(processData->nbPendingNotifications)
|
||||
if(processData != NULL && processData->nbPendingNotifications)
|
||||
*notificationId = 0;
|
||||
return 0xD8806404;
|
||||
}
|
||||
|
Reference in New Issue
Block a user