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