Module: wine Branch: master Commit: 055d8d461137ba00d8075526caeb07b4904d909d URL: http://source.winehq.org/git/wine.git/?a=commit;h=055d8d461137ba00d8075526ca...
Author: Detlef Riekenberg wine.dev@web.de Date: Wed Feb 14 22:54:19 2007 +0100
winspool: Do not access NULL when HeapAlloc failed.
---
dlls/winspool.drv/info.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/dlls/winspool.drv/info.c b/dlls/winspool.drv/info.c index 73bd574..f730be2 100644 --- a/dlls/winspool.drv/info.c +++ b/dlls/winspool.drv/info.c @@ -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) {