[Libreoffice-commits] core.git: Branch 'libreoffice-6-2-0' - basctl/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Fri Jan 11 21:09:14 UTC 2019
basctl/source/basicide/macrodlg.cxx | 20 ++++++++------------
1 file changed, 8 insertions(+), 12 deletions(-)
New commits:
commit d5289906cd67d27701ee94351885bf1e641606fa
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Wed Jan 9 13:22:37 2019 +0000
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Fri Jan 11 22:08:52 2019 +0100
Resolves: tdf#122598 avoid crash on macro recording end
Change-Id: Ie9f9fc8b4a4a7852a5da37c7d190ca020391012e
Reviewed-on: https://gerrit.libreoffice.org/66162
Tested-by: Xisco Faulí <xiscofauli at libreoffice.org>
Reviewed-by: Michael Stahl <Michael.Stahl at cib.de>
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/basctl/source/basicide/macrodlg.cxx b/basctl/source/basicide/macrodlg.cxx
index 182627597940..af5415296322 100644
--- a/basctl/source/basicide/macrodlg.cxx
+++ b/basctl/source/basicide/macrodlg.cxx
@@ -226,21 +226,17 @@ void MacroChooser::EnableButton(weld::Button& rButton, bool bEnable)
SbMethod* MacroChooser::GetMacro()
{
- SbMethod* pMethod = nullptr;
- m_xBasicBox->get_cursor(m_xBasicBoxIter.get());
+ if (!m_xBasicBox->get_cursor(m_xBasicBoxIter.get()))
+ return nullptr;
SbModule* pModule = m_xBasicBox->FindModule(m_xBasicBoxIter.get());
- if (pModule)
- {
- if (m_xMacroBox->get_selected(m_xMacroBoxIter.get()))
- {
- OUString aMacroName(m_xMacroBox->get_text(*m_xMacroBoxIter));
- pMethod = pModule->FindMethod(aMacroName, SbxClassType::Method);
- }
- }
- return pMethod;
+ if (!pModule)
+ return nullptr;
+ if (!m_xMacroBox->get_selected(m_xMacroBoxIter.get()))
+ return nullptr;
+ OUString aMacroName(m_xMacroBox->get_text(*m_xMacroBoxIter));
+ return pModule->FindMethod(aMacroName, SbxClassType::Method);
}
-
void MacroChooser::DeleteMacro()
{
SbMethod* pMethod = GetMacro();
More information about the Libreoffice-commits
mailing list