Apache OpenOffice (AOO) Bugzilla – Issue 109921
sw: meaningless tests against NULL
Last modified: 2013-08-07 14:44:07 UTC
in sw/source/core/frmedt/feshview.cxx we first check if (pTmpObj)... ... if (pTmpObj) else foo Seeing as pTmpObj is not null, and is not modified afterwards, the foo branch can never be executed so patch to remove it attached. Similarly in sw/source/ui/uno/unotxvw.cxx we have... SwWrtShell* pOldSh = &m_pView->GetWrtShell(); if (pOldSh) foo Its not possible to pOldSh to not be NULL, so the if doesn't make any real sense. Patch also cleans that up.
Created attachment 68212 [details] clean these up
at first i was a bit concerned about the change in feshview.cxx, but it seems the return value of GetMarkedSdrObj() is not checked anywhere in that file, so i suppose it works :) the pointer in unotxvw.cxx is completely, err, pointless. thanks for the patch!
fixed in cws sw33bf03: http://hg.services.openoffice.org/hg/cws/sw33bf03/rev/5ef8f3c98a50
*** Issue 110771 has been marked as a duplicate of this issue. ***
please verify
verified, dead tests removed, logic unchanged
integrated DEV300_m79