[Libreoffice-commits] core.git: basctl/source

Julien Nabet serval2412 at yahoo.fr
Wed Feb 15 06:07:32 UTC 2017


 basctl/source/basicide/moduldlg.cxx |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit 18be4782ad4a98041d9680f8d76a213b8fd49362
Author: Julien Nabet <serval2412 at yahoo.fr>
Date:   Tue Feb 14 21:00:45 2017 +0100

    tdf#105386: crash with macro organizer
    
    bt part:
    0  SvTreeList::GetParent (this=0x560670dd2e40, pEntry=pEntry at entry=0x0) at /home/julien/lo/libreoffice/svtools/source/contnr/treelist.cxx:1693
    1  0x00007fd90573298c in SvTreeListBox::GetParent (this=this at entry=0x560670dd0d60, pEntry=pEntry at entry=0x0)
        at /home/julien/lo/libreoffice/svtools/source/contnr/treelistbox.cxx:779
    2  0x00007fd8dfc3b4d8 in basctl::ExtTreeListBox::NotifyAcceptDrop (this=0x560670dd0d60, pEntry=0x560670e90b20)
        at /home/julien/lo/libreoffice/basctl/source/basicide/moduldlg.cxx:180
    
    Change-Id: I033440c1fcc50e2c7a0bb1eed0efa4559c514126
    Reviewed-on: https://gerrit.libreoffice.org/34280
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Julien Nabet <serval2412 at yahoo.fr>

diff --git a/basctl/source/basicide/moduldlg.cxx b/basctl/source/basicide/moduldlg.cxx
index c76e716..1d46f11 100644
--- a/basctl/source/basicide/moduldlg.cxx
+++ b/basctl/source/basicide/moduldlg.cxx
@@ -177,7 +177,9 @@ bool ExtTreeListBox::NotifyAcceptDrop( SvTreeListEntry* pEntry )
 
     // don't drop in the same library
     SvTreeListEntry* pSelected = FirstSelected();
-    if ( ( nDepth == 1 ) && ( pEntry == GetParent( pSelected ) ) )
+    if (!pSelected)
+        bValid = false;
+    else if ( ( nDepth == 1 ) && ( pEntry == GetParent( pSelected ) ) )
         bValid = false;
     else if ( ( nDepth == 2 ) && ( GetParent( pEntry ) == GetParent( pSelected ) ) )
         bValid = false;


More information about the Libreoffice-commits mailing list