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

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Tue Mar 5 15:43:40 UTC 2019


 vcl/source/app/salvtables.cxx |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

New commits:
commit b1df6d21bf9a608cccb7f34f6cebe9eee5cec18e
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Tue Mar 5 12:11:24 2019 +0000
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Tue Mar 5 16:43:16 2019 +0100

    sync get_active_id impls
    
    Change-Id: I6b0595f6386657afa28b2cb249ea69aa51e5fb4a
    Reviewed-on: https://gerrit.libreoffice.org/68740
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx
index 325d320704fe..f0efbf9373e0 100644
--- a/vcl/source/app/salvtables.cxx
+++ b/vcl/source/app/salvtables.cxx
@@ -3677,7 +3677,12 @@ public:
 
     virtual OUString get_active_id() const override
     {
-        const OUString* pRet = getEntryData(m_xComboBox->GetSelectedEntryPos());
+        sal_Int32 nPos = m_xComboBox->GetSelectedEntryPos();
+        const OUString* pRet;
+        if (nPos != LISTBOX_ENTRY_NOTFOUND)
+            pRet = getEntryData(m_xComboBox->GetSelectedEntryPos());
+        else
+            pRet = nullptr;
         if (!pRet)
             return OUString();
         return *pRet;


More information about the Libreoffice-commits mailing list