Hi,

Please find the latest report on new defect(s) introduced to LibreOffice found 
with Coverity Scan.

2 new defect(s) introduced to LibreOffice found with Coverity Scan.


New defect(s) Reported-by: Coverity Scan
Showing 2 of 2 defect(s)


** CID 1503287:  Null pointer dereferences  (FORWARD_NULL)


________________________________________________________________________________________________________
*** CID 1503287:  Null pointer dereferences  (FORWARD_NULL)
/sw/source/uibase/utlui/navipi.cxx: 546 in 
SwNavigationPI::SwNavigationPI(weld::Widget *, const 
com::sun::star::uno::Reference<com::sun::star::frame::XFrame> &, SfxBindings *, 
SfxNavigator *)()
540         m_xContainer->connect_container_focus_changed(LINK(this, 
SwNavigationPI, SetFocusChildHdl));
541     
542         Reference<XToolbarController> xController =
543                 
m_xContent2Dispatch->GetControllerForCommand(".uno:NavElement");
544         NavElementToolBoxControl* pToolBoxControl =
545                 dynamic_cast<NavElementToolBoxControl*>(xController.get());
>>>     CID 1503287:  Null pointer dereferences  (FORWARD_NULL)
>>>     Passing null pointer "pToolBoxControl" to "GetComboBox", which 
>>> dereferences it.
546         m_pNavigateByComboBox = pToolBoxControl->GetComboBox();
547     
548         // Restore content tree settings before calling UpdateInitShow. 
UpdateInitShow calls Fillbox,
549         // which calls Display and UpdateTracking. Incorrect outline levels 
could be displayed and
550         // unexpected content tracking could occur if these content tree 
settings are not done before.
551         
m_xContentTree->SetOutlineLevel(static_cast<sal_uInt8>(m_pConfig->GetOutlineLevel()));

** CID 1503286:  Error handling issues  (CHECKED_RETURN)
/sw/source/uibase/utlui/content.cxx: 4544 in 
SwContentTree::SelectHdl(weld::TreeView &)()


________________________________________________________________________________________________________
*** CID 1503286:  Error handling issues  (CHECKED_RETURN)
/sw/source/uibase/utlui/content.cxx: 4544 in 
SwContentTree::SelectHdl(weld::TreeView &)()
4538         }
4539         Select();
4540         if (m_bIsRoot)
4541             return;
4542         // Select the content type in the Navigate By control
4543         std::unique_ptr<weld::TreeIter> 
xEntry(m_xTreeView->make_iterator());
>>>     CID 1503286:  Error handling issues  (CHECKED_RETURN)
>>>     Calling "get_selected" without checking return value (as is done 
>>> elsewhere 94 out of 109 times).
4544         m_xTreeView->get_selected(xEntry.get());
4545         while (m_xTreeView->get_iter_depth(*xEntry))
4546             m_xTreeView->iter_parent(*xEntry);
4547         
m_pDialog->SelectNavigateByContentType(m_xTreeView->get_text(*xEntry));
4548     }
4549     


________________________________________________________________________________________________________
To view the defects in Coverity Scan visit, 
https://u15810271.ct.sendgrid.net/ls/click?upn=HRESupC-2F2Czv4BOaCWWCy7my0P0qcxCbhZ31OYv50ypSs1kiFPuCn2xFdlMIFBirii0zZ9j2-2F9F2XPBcBm2BNgi9duPy3v-2FzgFDd2LJ-2BDKI-3DtwdG_OTq2XUZbbipYjyLSo6GRo-2FpVxQ9OzkDINu9UTS-2FQhSdO0F0jQniitrGlNxDIzPJiErDtnzz1BKXmMf91ERL0XB1OmR4FeH39llIJ7HtcI7VHMFv92gd-2BIACYzHwuZ83uK4wh37TI8ZCbYTY9Qxp7WNSyW9tE8dzQm1y5ZVlT5xJAhUpMLl9biQLhGfHtPvcIlD6-2BlQDoJScJn3UzV8OwvT3tMPDW44A4vlrkDLRm5E0-3D

Reply via email to