[PATCH libreoffice-3-6] resolved rhbz#918544 do not attempt to access non-existing f...

Eike Rathke (via Code Review) gerrit at gerrit.libreoffice.org
Thu Apr 18 06:27:51 PDT 2013


Hi,

I have submitted a patch for review:

    https://gerrit.libreoffice.org/3460

To pull it, you can do:

    git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/60/3460/1

resolved rhbz#918544 do not attempt to access non-existing format

Removing the last condition removes the conditional format, don't use
the null pointer.

Change-Id: Icb3e01ccbf8182bdf8eed1d52263ab34c9b297ff
---
M sc/source/ui/condformat/condformatmgr.cxx
1 file changed, 5 insertions(+), 2 deletions(-)



diff --git a/sc/source/ui/condformat/condformatmgr.cxx b/sc/source/ui/condformat/condformatmgr.cxx
index 03fbeb3..e510ba9 100644
--- a/sc/source/ui/condformat/condformatmgr.cxx
+++ b/sc/source/ui/condformat/condformatmgr.cxx
@@ -216,8 +216,11 @@
         sal_Int32 nKey = pFormat->GetKey();
         mpFormatList->erase(nKey);
         ScConditionalFormat* pNewFormat = pDlg->GetConditionalFormat();
-        pNewFormat->SetKey(nKey);
-        mpFormatList->InsertNew(pNewFormat);
+        if (pNewFormat)
+        {
+            pNewFormat->SetKey(nKey);
+            mpFormatList->InsertNew(pNewFormat);
+        }
         maCtrlManager.Update();
     }
     delete pDlg;

-- 
To view, visit https://gerrit.libreoffice.org/3460
To unsubscribe, visit https://gerrit.libreoffice.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Icb3e01ccbf8182bdf8eed1d52263ab34c9b297ff
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: libreoffice-3-6
Gerrit-Owner: Eike Rathke <erack at redhat.com>



More information about the LibreOffice mailing list