include/sfx2/LokControlHandler.hxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit a1687e1fe580561a8fbf0d2796b0c1f06ed2b405
Author:     Thorsten Behrens <thorsten.behr...@allotropia.de>
AuthorDate: Sat Aug 5 02:20:58 2023 +0200
Commit:     Xisco Fauli <xiscofa...@libreoffice.org>
CommitDate: Mon Aug 7 10:40:38 2023 +0200

    Fix crash in lokit form control mouse handler
    
    Since 7adfecb0f5947ae258226c8d1652546f81577026
    
    , clicking on form controls results in a crash like this one:
    
      0x00007f7c81092a7c in __pthread_kill_implementation () at /lib64/libc.so.6
      0x00007f7c81041226 in raise () at /lib64/libc.so.6
      0x00007f7c81029897 in abort () at /lib64/libc.so.6
      0x00007f7c812e4c60 in __gnu_debug::_Safe_sequence_base::_M_get_mutex() () 
at /lib64/libstdc++.so.6
      0x00007f7c2aaaf36f in std::_Optional_base_impl<PointerStyle, 
std::_Optional_base<PointerStyle, true, true> >::_M_get()
      (this=0x7f7c2c673b50 <LokControlHandler::postMouseEvent(SdrPage const*, 
SdrView const*, vcl::DocWindow&, int, Point, int, int, int)::eDocPointerStyle>)
      at /usr/include/c++/13/optional:477
      0x00007f7c2aaa9b24 in std::optional<PointerStyle>::operator*() &
      (this=0x7f7c2c673b50 <LokControlHandler::postMouseEvent(SdrPage const*, 
SdrView const*, vcl::DocWindow&, int, Point, int, int, int)::eDocPointerStyle>)
      at /usr/include/c++/13/optional:974
      0x00007f7c2aaa66bb in LokControlHandler::postMouseEvent(SdrPage const*, 
SdrView const*, vcl::DocWindow&, int, Point, int, int, int)
      (pPage=0x7f7c6ec35910, pDrawView=0x7f7c6f097a40, rMainWindow=..., 
nType=0, aPointHmm=Point = {...}, nCount=1, nButtons=1, nModifier=0)
      at core/include/sfx2/LokControlHandler.hxx:79
      0x00007f7c2aa9d784 in SwXTextDocument::postMouseEvent(int, int, int, int, 
int, int) (this=0x7f7c6eae94f0, nType=0, nX=1756, nY=4106, nCount=1, 
nButtons=1, nModifier=0)
      at core/sw/source/uibase/uno/unotxdoc.cxx:3741
      0x00007f7c7c8fb074 in doc_postMouseEvent(LibreOfficeKitDocument*, int, 
int, int, int, int, int) (pThis=0x7f7c6f37fe90, nType=0, nX=1756, nY=4106, 
nCount=1, nButtons=1, nModifier=0)
      at core/desktop/source/lib/init.cxx:5062
      0x00007f7c81642c9e in postMouseEventInThread(gpointer) (data=0x19aa340) 
at core/libreofficekit/source/gtk/lokdocview.cxx:2335
      0x00007f7c816441fb in lokThreadFunc(gpointer, gpointer) (data=0x19aa340) 
at core/libreofficekit/source/gtk/lokdocview.cxx:2567
    
    Change-Id: I77e85df6a77adc033cc793488924ed676a9900be
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155364
    Tested-by: Jenkins
    Reviewed-by: Thorsten Behrens <thorsten.behr...@allotropia.de>
    (cherry picked from commit 30fa03428e9fa9aecf753c14bc3c5156a471d49e)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155307
    Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org>

diff --git a/include/sfx2/LokControlHandler.hxx 
b/include/sfx2/LokControlHandler.hxx
index dc69787456e5..a292f137471b 100644
--- a/include/sfx2/LokControlHandler.hxx
+++ b/include/sfx2/LokControlHandler.hxx
@@ -76,7 +76,7 @@ public:
                         // and set pointer style to arrow
                         if (!eDocPointerStyle)
                         {
-                            *eDocPointerStyle = rMainWindow.GetPointer();
+                            eDocPointerStyle = rMainWindow.GetPointer();
                             rMainWindow.SetPointer(pWindow->GetPointer());
                         }
 

Reply via email to