From da15cb3d111f65356726ee5ed15bd82c73d5ccce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Sat, 18 May 2024 19:55:06 +0100 Subject: [PATCH] use same pattern as elsewhere for consistency MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I126fbbee916fd515a7057e3793f239e6f69748fa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167835 Reviewed-by: Caolán McNamara Tested-by: Jenkins --- vcl/win/gdi/salprn.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vcl/win/gdi/salprn.cxx b/vcl/win/gdi/salprn.cxx index 6edcc9ac2938..b43c59e27473 100644 --- a/vcl/win/gdi/salprn.cxx +++ b/vcl/win/gdi/salprn.cxx @@ -164,9 +164,9 @@ void WinSalInstance::GetPrinterQueueInfo( ImplPrnQueueList* pList ) if ( nBytes ) { PRINTER_INFO_4W* pWinInfo4 = static_cast(std::malloc( nBytes )); + assert(pWinInfo4 && "Don't handle OOM conditions"); if ( EnumPrintersW( PRINTER_ENUM_LOCAL | PRINTER_ENUM_CONNECTIONS, nullptr, 4, reinterpret_cast(pWinInfo4), nBytes, &nBytes, &nInfoPrn4 ) ) { - assert(pWinInfo4); for ( i = 0; i < nInfoPrn4; i++ ) { std::unique_ptr pInfo(new SalPrinterQueueInfo);