From: Michael Curran Date: Wed, 23 Mar 2011 01:46:15 +0000 (+1000) Subject: nvdaHelper fake_createCompatibleDc: don't create a new displayModel if the real_creat... X-Git-Tag: jpdev130418~1908 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=10336808782b76d45a7f70f8e4e0955ba2b1fc5e;p=nvdajp%2Fnvdajp.git nvdaHelper fake_createCompatibleDc: don't create a new displayModel if the real_createCompatibleDc returns NULL. Very rare, but could happen. --- diff --git a/nvdaHelper/remote/gdiHooks.cpp b/nvdaHelper/remote/gdiHooks.cpp index 3732d62f2..95a4684fb 100644 --- a/nvdaHelper/remote/gdiHooks.cpp +++ b/nvdaHelper/remote/gdiHooks.cpp @@ -431,6 +431,7 @@ HDC WINAPI fake_CreateCompatibleDC(HDC hdc) { //If the creation was successful, and the DC that was used in the creation process is a window DC, //we should create a displayModel for this DC so that text writes can be tracked in case its ever bit blitted to a window DC. //We also need to acquire access to the model maps while we do this + if(!newHdc) return NULL; displayModel_t* model=new displayModel_t(); displayModelsByMemoryDC.acquire(); displayModelsByMemoryDC.insert(make_pair(newHdc,model));