CreateNotificationService should check for null UUID
This commit is contained in:
parent
80f3744407
commit
ffe2f926b2
2 changed files with 14 additions and 0 deletions
7
Ryujinx.HLE/HOS/Services/Friend/FriendErr.cs
Normal file
7
Ryujinx.HLE/HOS/Services/Friend/FriendErr.cs
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
namespace Ryujinx.HLE.HOS.Services.Friend
|
||||||
|
{
|
||||||
|
static class FriendErr
|
||||||
|
{
|
||||||
|
public const int InvalidUuid = 2;
|
||||||
|
}
|
||||||
|
}
|
|
@ -2,6 +2,8 @@ using Ryujinx.HLE.HOS.Ipc;
|
||||||
using Ryujinx.HLE.Utilities;
|
using Ryujinx.HLE.Utilities;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
||||||
|
using static Ryujinx.HLE.HOS.ErrorCode;
|
||||||
|
|
||||||
namespace Ryujinx.HLE.HOS.Services.Friend
|
namespace Ryujinx.HLE.HOS.Services.Friend
|
||||||
{
|
{
|
||||||
class IServiceCreator : IpcService
|
class IServiceCreator : IpcService
|
||||||
|
@ -33,6 +35,11 @@ namespace Ryujinx.HLE.HOS.Services.Friend
|
||||||
{
|
{
|
||||||
UInt128 userId = new UInt128(context.RequestData.ReadBytes(0x10));
|
UInt128 userId = new UInt128(context.RequestData.ReadBytes(0x10));
|
||||||
|
|
||||||
|
if (userId.IsNull)
|
||||||
|
{
|
||||||
|
return MakeError(ErrorModule.Friends, FriendErr.InvalidUuid);
|
||||||
|
}
|
||||||
|
|
||||||
MakeObject(context, new INotificationService(userId));
|
MakeObject(context, new INotificationService(userId));
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue