Skip to content

Commit 7dd63ba

Browse files
Gracefully handle null strings in RemoveRoutineTSH to prevent a possible null subscript error
Co-authored-by: Cameron M <[email protected]>
1 parent 1ea9946 commit 7dd63ba

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

cls/SourceControl/Git/Utils.cls

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1329,8 +1329,14 @@ ClassMethod UpdateRoutineTSH(InternalName As %String, tsh As %String) As %Status
13291329

13301330
ClassMethod RemoveRoutineTSH(InternalName As %String) As %Status
13311331
{
1332-
kill @..#Storage@("TSH", ##class(%Studio.SourceControl.Interface).normalizeName(InternalName))
1333-
quit $$$OK
1332+
Quit:(InternalName = "") $$$OK
1333+
Set tInternalName = ##class(%Studio.SourceControl.Interface).normalizeName(InternalName)
1334+
1335+
// Prevent a possible null subscript error
1336+
Quit:(tInternalName = "") $$$OK
1337+
Kill @..#Storage@("TSH", tInternalName)
1338+
1339+
Quit $$$OK
13341340
}
13351341

13361342
ClassMethod DeleteExternalFile(InternalName As %String) As %Status

0 commit comments

Comments
 (0)