cid#1636563 Unchecked return value

Change-Id: I8d9cf983ca8c96d1619aceff9113732814d09f09
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177773
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Jenkins
This commit is contained in:
Caolán McNamara 2024-12-04 08:53:35 +00:00
parent a1d7dd96ea
commit e4dbbcd7a5

View file

@ -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 )