winspool: Do not access NULL when HeapAlloc failed.

This commit is contained in:
Detlef Riekenberg 2007-02-14 22:54:19 +01:00 committed by Alexandre Julliard
parent ba7207cbc0
commit 055d8d4611
1 changed files with 1 additions and 1 deletions

View File

@ -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;
/* fill the buffer, if we have one */
if (pPorts && (cbBuf >= needed )) {
if (pPorts && (cbBuf >= needed ) && pm->cache) {
cacheindex = 0;
cache = pm->cache;
while (cacheindex < pm->returned) {