[Libreoffice-commits] core.git: Branch 'libreoffice-6-4' - chart2/source
Muhammet Kara (via logerrit)
logerrit at kemper.freedesktop.org
Fri Dec 13 20:16:01 UTC 2019
chart2/source/controller/sidebar/ChartColorWrapper.cxx | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
New commits:
commit f12c5078facde462343ddfa2c8ed4edb0f5626c9
Author: Muhammet Kara <muhammet.kara at collabora.com>
AuthorDate: Fri Dec 13 16:02:17 2019 +0300
Commit: Muhammet Kara <muhammet.kara at collabora.com>
CommitDate: Fri Dec 13 21:15:15 2019 +0100
tdf#129056: No need for catastrophe
We can continue working without hurting others
in case of an invalid reference.
Putting in a warning so that it doesn't become
a black hole which silences errors.
Change-Id: I6d75edeba227a4293b0ae16217811e49ae336a6b
Reviewed-on: https://gerrit.libreoffice.org/85111
Tested-by: Jenkins
Reviewed-by: Muhammet Kara <muhammet.kara at collabora.com>
(cherry picked from commit e290c3f3e233f03a0b13d19553c637f0a7070fbf)
Reviewed-on: https://gerrit.libreoffice.org/85130
diff --git a/chart2/source/controller/sidebar/ChartColorWrapper.cxx b/chart2/source/controller/sidebar/ChartColorWrapper.cxx
index 32763beb02e7..31808b1a292b 100644
--- a/chart2/source/controller/sidebar/ChartColorWrapper.cxx
+++ b/chart2/source/controller/sidebar/ChartColorWrapper.cxx
@@ -72,8 +72,19 @@ ChartColorWrapper::ChartColorWrapper(
void ChartColorWrapper::operator()(const OUString& , const NamedColor& rColor)
{
+ if (!mxModel.is())
+ {
+ SAL_WARN("chart2", "Invalid reference to mxModel");
+ return;
+ }
+
css::uno::Reference<css::beans::XPropertySet> xPropSet = getPropSet(mxModel);
- assert(xPropSet.is());
+
+ if (!xPropSet.is())
+ {
+ SAL_WARN("chart2", "Invalid reference to xPropSet");
+ return;
+ }
xPropSet->setPropertyValue(maPropertyName, css::uno::makeAny(rColor.first));
}
More information about the Libreoffice-commits
mailing list