[Libreoffice-commits] core.git: sc/source
Stephan Bergmann (via logerrit)
logerrit at kemper.freedesktop.org
Fri May 24 11:09:55 UTC 2019
sc/source/ui/navipi/content.cxx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit 5780a495872bbcc9df595c534425515727516a4a
Author: Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Fri May 24 11:01:25 2019 +0200
Commit: Stephan Bergmann <sbergman at redhat.com>
CommitDate: Fri May 24 13:08:40 2019 +0200
Avoid unnecessary, wrong downcast
...from SvLBoxItem to SvLBoxString. In a UBSan build, hovering the mouse over
the Navigator dialog in Calc caused
> sc/source/ui/navipi/content.cxx:727:39: runtime error: downcast of address 0x6030012a2820 which does not point to an object of type 'SvLBoxString'
> 0x6030012a2820: note: object is of type 'SvLBoxContextBmp'
> 15 02 80 76 50 8c 29 97 22 7f 00 00 00 be be be be be be be 10 d1 3a 01 40 60 00 00 00 00 00 00
> ^~~~~~~~~~~~~~~~~~~~~~~
> vptr for 'SvLBoxContextBmp'
> #0 in ScContentTree::RequestHelp(HelpEvent const&) at sc/source/ui/navipi/content.cxx:727:39
> #1 in ImplHandleMouseHelpRequest(vcl::Window*, Point const&) at vcl/source/window/winproc.cxx:183:25
> #2 in ImplHandleMouseEvent(VclPtr<vcl::Window> const&, MouseNotifyEvent, bool, long, long, unsigned long, unsigned short, MouseEventModifiers) at vcl/source/window/winproc.cxx:729:13
> #3 in ImplHandleSalMouseMove(vcl::Window*, SalMouseEvent const*) at vcl/source/window/winproc.cxx:2003:12
[...]
Change-Id: Iea5cda6e3be5c759eb71ad3100dc9b1870bda460
Reviewed-on: https://gerrit.libreoffice.org/72897
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman at redhat.com>
diff --git a/sc/source/ui/navipi/content.cxx b/sc/source/ui/navipi/content.cxx
index 536d398f482c..e3c1f0c724ef 100644
--- a/sc/source/ui/navipi/content.cxx
+++ b/sc/source/ui/navipi/content.cxx
@@ -724,7 +724,7 @@ void ScContentTree::RequestHelp( const HelpEvent& rHEvt )
if (bRet)
{
SvLBoxTab* pTab;
- SvLBoxString* pItem = static_cast<SvLBoxString*>(GetItem( pEntry, aPos.X(), &pTab ));
+ SvLBoxItem* pItem = GetItem( pEntry, aPos.X(), &pTab );
if( pItem )
{
aPos = GetEntryPosition( pEntry );
More information about the Libreoffice-commits
mailing list