vcl/win/gdi/salprn.cxx |    1 +
 1 file changed, 1 insertion(+)

New commits:
commit 60600b5bc07487a5e31f643029357211d70c0481
Author:     Mike Kaganski <mike.kagan...@collabora.com>
AuthorDate: Sat May 18 15:28:48 2024 +0500
Commit:     Mike Kaganski <mike.kagan...@collabora.com>
CommitDate: Sat May 18 15:10:55 2024 +0200

    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    
    Change-Id: Id20f4bc308259a706cc55fc8331a5119b2172a14
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167807
    Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com>
    Tested-by: Jenkins

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);

Reply via email to