From e4dbbcd7a56f6b6b4827c0df3d2588d4a5ca3cfa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Wed, 4 Dec 2024 08:53:35 +0000 Subject: [PATCH] cid#1636563 Unchecked return value MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I8d9cf983ca8c96d1619aceff9113732814d09f09 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177773 Reviewed-by: Caolán McNamara Tested-by: Jenkins --- basctl/source/basicide/moduldlg.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/basctl/source/basicide/moduldlg.cxx b/basctl/source/basicide/moduldlg.cxx index 3909f696708e..991fd7d8a4c0 100644 --- a/basctl/source/basicide/moduldlg.cxx +++ b/basctl/source/basicide/moduldlg.cxx @@ -981,7 +981,8 @@ SbModule* createModImpl(weld::Window* pWin, const ScriptDocument& rDocument, // the module has existed if( rDocument.hasModule( aLibName, aModName ) ) return nullptr; - rDocument.createModule( aLibName, aModName, bMain, sModuleCode ); + if (!rDocument.createModule(aLibName, aModName, bMain, sModuleCode)) + return nullptr; BasicManager* pBasMgr = rDocument.getBasicManager(); StarBASIC* pBasic = pBasMgr? pBasMgr->GetLib( aLibName ) : nullptr; if ( pBasic )