sw: avoid wrong and unnecessary downcast in SwDrawView::DeleteMarked()
/sw/source/core/draw/dview.cxx:967:39: runtime error: downcast of address 0x6060006d1cc0 which does not point to an object of type 'SwDrawContact' 0x6060006d1cc0: note: object is of type 'SwFlyDrawContact' 1d 02 00 2e b0 3e 06 87 15 7f 00 00 18 3f 06 87 15 7f 00 00 50 1c 28 00 50 61 00 00 00 00 00 00 ^~~~~~~~~~~~~~~~~~~~~~~ vptr for 'SwFlyDrawContact' #0 0x7f157de946d8 in SwDrawView::DeleteMarked() /sw/source/core/draw/dview.cxx:967:39 SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /sw/source/core/draw/dview.cxx:967:39 in When executing testPasteListener in CppunitTest_sw_unowriter since commit 2a054445 (sw paste listener: expose pasted images as well, 2019-01-24), though that code was added much earlier in commit 33141f99 (SwDrawView::DeleteMarked: delete textbox of shape as well, 2014-06-23), just no testcase invoked it. Change-Id: I22a384ab7cc4b3eb00198b28de294896c2d1e3bb Reviewed-on: https://gerrit.libreoffice.org/66986Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
Showing
Please
register
or
sign in
to comment