check passed functions before use
This is a follow up to commit
55e86edcb3
to fix a crash that occurs
when importing a Basic library.
The change made to functions arguments passed to ImportLib in PS28
requires they be checked for nullptr before use. For further
understanding please see change to moduldl2.cxx at https://
gerrit.libreoffice.org/c/core/+/176254/27..28
Change-Id: I3f7ccc46134ddd2429c499d6e728e30331b51d7d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177924
Tested-by: Jenkins
Reviewed-by: Jim Raykowski <raykowj@gmail.com>
This commit is contained in:
parent
ab5b5ad75d
commit
b96894426f
1 changed files with 6 additions and 4 deletions
|
@ -817,6 +817,7 @@ void ImportLib(const ScriptDocument& rDocument, weld::Dialog* pDialog,
|
|||
// remove existing libraries
|
||||
if ( bRemove )
|
||||
{
|
||||
if (func_remove_entry)
|
||||
func_remove_entry(aLibName); // LibPage::InsertLib
|
||||
|
||||
// remove module library
|
||||
|
@ -939,7 +940,7 @@ void ImportLib(const ScriptDocument& rDocument, weld::Dialog* pDialog,
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (func_insert_entry)
|
||||
func_insert_entry(aLibName); // LibPage::InsertLib
|
||||
bChanges = true;
|
||||
}
|
||||
|
@ -947,6 +948,7 @@ void ImportLib(const ScriptDocument& rDocument, weld::Dialog* pDialog,
|
|||
|
||||
if (bChanges)
|
||||
{
|
||||
if (func_insert_entries)
|
||||
func_insert_entries(); // MacroManager
|
||||
MarkDocumentModified(rDocument);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue