diff options
Diffstat (limited to 'EmulatorPkg')
-rw-r--r-- | EmulatorPkg/Win/Host/WinGopInput.c | 4 | ||||
-rw-r--r-- | EmulatorPkg/Win/Host/WinGopScreen.c | 1 |
2 files changed, 5 insertions, 0 deletions
diff --git a/EmulatorPkg/Win/Host/WinGopInput.c b/EmulatorPkg/Win/Host/WinGopInput.c index 1c67a1cb40..22f12f1448 100644 --- a/EmulatorPkg/Win/Host/WinGopInput.c +++ b/EmulatorPkg/Win/Host/WinGopInput.c @@ -404,6 +404,10 @@ WinNtWndRegisterKeyNotify ( Private = GRAPHICS_PRIVATE_DATA_FROM_THIS (GraphicsIo);
+ if (Private == NULL) {
+ return EFI_INVALID_PARAMETER;
+ }
+
Private->MakeRegisterdKeyCallback = MakeCallBack;
Private->BreakRegisterdKeyCallback = BreakCallBack;
Private->RegisterdKeyCallbackContext = Context;
diff --git a/EmulatorPkg/Win/Host/WinGopScreen.c b/EmulatorPkg/Win/Host/WinGopScreen.c index 661573d777..bcbd153cfd 100644 --- a/EmulatorPkg/Win/Host/WinGopScreen.c +++ b/EmulatorPkg/Win/Host/WinGopScreen.c @@ -808,6 +808,7 @@ WinNtGraphicsWindowOpen ( GopPrivateCreateQ (Private, &Private->QueueForRead);
+ Private->Signature = GRAPHICS_PRIVATE_DATA_SIGNATURE;
Private->GraphicsWindowIo.Size = WinNtWndSize;
Private->GraphicsWindowIo.CheckKey = WinNtWndCheckKey;
Private->GraphicsWindowIo.GetKey = WinNtWndGetKey;
|