Commit 055d8d46 authored by Detlef Riekenberg's avatar Detlef Riekenberg Committed by Alexandre Julliard

winspool: Do not access NULL when HeapAlloc failed.

parent ba7207cb
...@@ -1261,7 +1261,7 @@ static DWORD get_ports_from_all_monitors(DWORD level, LPBYTE pPorts, DWORD cbBuf ...@@ -1261,7 +1261,7 @@ static DWORD get_ports_from_all_monitors(DWORD level, LPBYTE pPorts, DWORD cbBuf
needed += (level == 1) ? pm->pi1_needed : pm->pi2_needed; needed += (level == 1) ? pm->pi1_needed : pm->pi2_needed;
/* fill the buffer, if we have one */ /* fill the buffer, if we have one */
if (pPorts && (cbBuf >= needed )) { if (pPorts && (cbBuf >= needed ) && pm->cache) {
cacheindex = 0; cacheindex = 0;
cache = pm->cache; cache = pm->cache;
while (cacheindex < pm->returned) { while (cacheindex < pm->returned) {
......
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