diff options
author | Jean-Pierre Ledure <jp@ledure.be> | 2023-09-28 15:03:32 +0200 |
---|---|---|
committer | Jean-Pierre Ledure <jp@ledure.be> | 2023-09-28 16:16:38 +0200 |
commit | bbe4d3498c2f994342b4d213f0ae874e7b0b7775 (patch) | |
tree | a4f4c004b8b1cdfcbb68e41302cd36bb0fa817de /wizards | |
parent | 11aa86140eaac3d1d67db1f337fc1c76a511778f (diff) |
ScriptForge (SF_Base) tdf#156599 Error message when loading a form
Error occurs in SF_Base.IsLoaded(...)
"Object variable not set"
When user scripts run the method repeatedly from
nearly simultaneous events, it might happen
that the _FormDocuments private variable is
not initialized.
Simultaneous calls may be interpreted as internal
calls. Internal calls do not execute the "Check"
part of the published API.
Hence the failing initialization.
Solution: force the initialization of that specific
variable at each run.
Change-Id: I489cbaed7b8e57d6876b7af4b26f5be0beb3db69
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157374
Reviewed-by: Jean-Pierre Ledure <jp@ledure.be>
Tested-by: Jenkins
Diffstat (limited to 'wizards')
-rw-r--r-- | wizards/source/sfdocuments/SF_Base.xba | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/wizards/source/sfdocuments/SF_Base.xba b/wizards/source/sfdocuments/SF_Base.xba index f96ddfd22e46..b6497b9b4f12 100644 --- a/wizards/source/sfdocuments/SF_Base.xba +++ b/wizards/source/sfdocuments/SF_Base.xba @@ -415,10 +415,10 @@ Const cstSubArgs = "FormDocument" bLoaded = False Check: + If IsNull(_FormDocuments) Then Set _FormDocuments = _Component.getFormDocuments() If ScriptForge.SF_Utils._EnterFunction(cstThisSub, cstSubArgs) Then If Not _IsStillAlive() Then GoTo Finally ' Build list of available FormDocuments recursively with _CollectFormDocuments - If IsNull(_FormDocuments) Then Set _FormDocuments = _Component.getFormDocuments() vFormNames = Split(_CollectFormDocuments(_FormDocuments), cstToken) If Not ScriptForge.SF_Utils._Validate(FormDocument, "FormDocument", V_STRING, vFormNames) Then GoTo Finally End If |