From 8ba0c715c7a2ff88fe9c9d0cb7c7b3efa1dcd5ea Mon Sep 17 00:00:00 2001 From: Andreas Mohr Date: Sat, 20 Jul 2002 20:07:44 +0000 Subject: [PATCH] CreateDCA should return failure if both driver and device are NULL. --- objects/dc.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/objects/dc.c b/objects/dc.c index 6b99ad89c5a..171caed7e44 100644 --- a/objects/dc.c +++ b/objects/dc.c @@ -586,6 +586,9 @@ HDC WINAPI CreateDCA( LPCSTR driver, LPCSTR device, LPCSTR output, const DC_FUNCTIONS *funcs; char buf[300]; + if ((!driver) && (!device)) + return 0; + GDI_CheckNotLock(); if (!device || !DRIVER_GetDriverName( device, buf, sizeof(buf) ))