From aa6252fc130adaca9e380af4f977ea5acfb75bbc Mon Sep 17 00:00:00 2001 From: Magnus Olsen Date: Sat, 2 Dec 2006 19:26:55 +0000 Subject: [PATCH] fixed so only NULL and DDCREATE_HARDWAREONLY are accpect when you linking two directdraw interface. svn path=/trunk/; revision=25019 --- reactos/dll/directx/ddraw/startup.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/reactos/dll/directx/ddraw/startup.c b/reactos/dll/directx/ddraw/startup.c index 23d88cc2675..27e5dd52393 100644 --- a/reactos/dll/directx/ddraw/startup.c +++ b/reactos/dll/directx/ddraw/startup.c @@ -912,12 +912,24 @@ Create_DirectDraw (LPGUID pGUID, else { /* We got the DirectDraw interface alloc and we need create the link */ - LPDDRAWI_DIRECTDRAW_INT newThis; + + LPDDRAWI_DIRECTDRAW_INT newThis; newThis = DxHeapMemAlloc(sizeof(DDRAWI_DIRECTDRAW_INT)); if (newThis == NULL) { return DDERR_OUTOFMEMORY; } + + /* we need check the GUID lpGUID what type it is */ + if (pGUID != DDCREATE_HARDWAREONLY) + { + if (pGUID !=NULL) + { + This = newThis; + return DDERR_INVALIDDIRECTDRAWGUID; + } + } + newThis->lpLink = This; This = newThis; }