Commit 3429c3cf authored by Lionel Ulmer's avatar Lionel Ulmer Committed by Alexandre Julliard

Fix crash in GetAvailableVidMem function when TRACE is activated.

parent 1d854a10
......@@ -1120,7 +1120,7 @@ Main_DirectDraw_GetAvailableVidMem(LPDIRECTDRAW7 iface, LPDDSCAPS2 ddscaps,
TRACE("(%p)->(%p,%p,%p)\n", This,ddscaps,total,free);
if (TRACE_ON(ddraw)) {
TRACE(" Asking for memory of type : \n");
TRACE(" Asking for memory of type : ");
DDRAW_dump_DDSCAPS2(ddscaps); DPRINTF("\n");
}
......@@ -1128,7 +1128,9 @@ Main_DirectDraw_GetAvailableVidMem(LPDIRECTDRAW7 iface, LPDDSCAPS2 ddscaps,
if (total) *total= This->total_vidmem;
if (free) *free = This->available_vidmem;
TRACE(" returning (total) %ld / (free) %ld\n", *total, *free);
TRACE(" returning (total) %ld / (free) %ld\n",
total != NULL ? *total : 0,
free != NULL ? *free : 0);
return DD_OK;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment