1/3 winex11: move XRENDERINFO allocation in a separate function [attempt 2]

Jacek Caban jacek at codeweavers.com
Wed Oct 7 04:39:11 CDT 2009


Hi Roderick,

Roderick Colenbrander wrote:
> Hi,
>
> This is an updated version which uses a proper function prototype for
> alloc_xrenderinfo. Further it checks whether the function succeeded in
> XRender_SelectFont.
>   
     EnterCriticalSection(&xrender_cs);
-    if(!physDev->xrender) {
-        physDev->xrender = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY,
-				     sizeof(*physDev->xrender));
-	physDev->xrender->cache_index = -1;
+    if(!physDev->xrender)
+    {
+        physDev->xrender = alloc_xrenderinfo();
+        if(!physDev->xrender)
+            return 0;


You return without leaving the critical section here.


Jacek




More information about the wine-devel mailing list