Merge pull request #1307 from lioncash/null2

sm/notifications: Prevent potential null pointer dereference in ReceiveNotification
This commit is contained in:
TuxSH 2019-11-05 00:14:49 +00:00 committed by GitHub
commit 31dae90dcd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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;
}