From 38ed6b173ce3cc11b3b4f99344e75edaf6ab735d Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Wed, 10 Feb 2021 09:51:55 +0000 Subject: cid#1472858 Unchecked dynamic_cast MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I3103719f6184efb7b9ecfb6d589d6757449814cd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110693 Tested-by: Jenkins Reviewed-by: Caolán McNamara --- vcl/jsdialog/executor.cxx | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/vcl/jsdialog/executor.cxx b/vcl/jsdialog/executor.cxx index 53f70630fe1c..8c76e77d8b37 100644 --- a/vcl/jsdialog/executor.cxx +++ b/vcl/jsdialog/executor.cxx @@ -37,12 +37,8 @@ StringMap jsonToStringMap(const char* pJSON) void SendFullUpdate(sal_uInt64 nWindowId, const OString& rWidget) { weld::Widget* pWidget = JSInstanceBuilder::FindWeldWidgetsMap(nWindowId, rWidget); - - if (pWidget != nullptr) - { - auto pJSWidget = dynamic_cast(pWidget); + if (auto pJSWidget = dynamic_cast(pWidget)) pJSWidget->sendFullUpdate(); - } } bool ExecuteAction(sal_uInt64 nWindowId, const OString& rWidget, StringMap& rData) -- cgit