vcl/win/gdi/salprn.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
New commits: commit da15cb3d111f65356726ee5ed15bd82c73d5ccce Author: Caolán McNamara <caolan.mcnam...@collabora.com> AuthorDate: Sat May 18 19:55:06 2024 +0100 Commit: Caolán McNamara <caolan.mcnam...@collabora.com> CommitDate: Fri May 24 22:11:13 2024 +0200 use same pattern as elsewhere for consistency Change-Id: I126fbbee916fd515a7057e3793f239e6f69748fa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167835 Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com> Tested-by: Jenkins 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<PRINTER_INFO_4W*>(std::malloc( nBytes )); + assert(pWinInfo4 && "Don't handle OOM conditions"); if ( EnumPrintersW( PRINTER_ENUM_LOCAL | PRINTER_ENUM_CONNECTIONS, nullptr, 4, reinterpret_cast<LPBYTE>(pWinInfo4), nBytes, &nBytes, &nInfoPrn4 ) ) { - assert(pWinInfo4); for ( i = 0; i < nInfoPrn4; i++ ) { std::unique_ptr<SalPrinterQueueInfo> pInfo(new SalPrinterQueueInfo);