include/vcl/BitmapReadAccess.hxx |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit 84e1c79dd7394168459a3bbdea8bd94d765708e0
Author:     Caolán McNamara <caol...@redhat.com>
AuthorDate: Fri Sep 10 18:13:00 2021 +0100
Commit:     Caolán McNamara <caol...@redhat.com>
CommitDate: Fri Sep 10 22:36:41 2021 +0200

    access maPalette via const BitmapBuffer* when in const method
    
    Change-Id: I7bd1fb312ef7122e25c4d19679773d0c1ccab7be
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121916
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caol...@redhat.com>

diff --git a/include/vcl/BitmapReadAccess.hxx b/include/vcl/BitmapReadAccess.hxx
index 2659a9960a51..159ff38b157e 100644
--- a/include/vcl/BitmapReadAccess.hxx
+++ b/include/vcl/BitmapReadAccess.hxx
@@ -88,7 +88,10 @@ public:
     BitmapColor GetColor(tools::Long nY, tools::Long nX) const
     {
         if (HasPalette())
-            return mpBuffer->maPalette[GetPixelIndex(nY, nX)];
+        {
+            const BitmapBuffer* pBuffer = mpBuffer;
+            return pBuffer->maPalette[GetPixelIndex(nY, nX)];
+        }
         else
             return GetPixel(nY, nX);
     }

Reply via email to