summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2024-05-18 15:28:48 +0500
committerMike Kaganski <mike.kaganski@collabora.com>2024-05-18 15:10:55 +0200
commit60600b5bc07487a5e31f643029357211d70c0481 (patch)
treedba08387db7a4fb60deff621f0ea0636dc555701 /vcl
parentb2dc515e2a3c8420c7f39c0b4396632c2086126a (diff)
WaE: Dereferencing NULL pointer
C:/lo/core/vcl/win/gdi/salprn.cxx(180): error C2220: the following warning is treated as an error C:\lo\core\vcl\win\gdi\salprn.cxx(172): warning C6011: Dereferencing NULL pointer 'pWinInfo4'. : Lines: 160, 161, 162, 163, 164, 166, 167, 169, 171, 172 Change-Id: Id20f4bc308259a706cc55fc8331a5119b2172a14 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167807 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Jenkins
Diffstat (limited to 'vcl')
-rw-r--r--vcl/win/gdi/salprn.cxx1
1 files changed, 1 insertions, 0 deletions
diff --git a/vcl/win/gdi/salprn.cxx b/vcl/win/gdi/salprn.cxx
index 80ea56f2e9f8..6edcc9ac2938 100644
--- a/vcl/win/gdi/salprn.cxx
+++ b/vcl/win/gdi/salprn.cxx
@@ -166,6 +166,7 @@ void WinSalInstance::GetPrinterQueueInfo( ImplPrnQueueList* pList )
PRINTER_INFO_4W* pWinInfo4 = static_cast<PRINTER_INFO_4W*>(std::malloc( nBytes ));
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);