Skip to content

Commit 6b10ec9

Browse files
author
Christian Weichel
committed
[supervisor] Don't blindly deref port configs
fixes #3007 /werft no-preview
1 parent 4cc6245 commit 6b10ec9

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

components/supervisor/pkg/ports/ports-config.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,10 @@ func parseWorkspaceConfigs(ports []*gitpod.PortConfig) (portConfigs map[uint32]*
181181

182182
func parseInstanceConfigs(ports []*gitpod.PortsItems) (portConfigs map[uint32]*gitpod.PortConfig, rangeConfigs []*RangeConfig) {
183183
for _, config := range ports {
184+
if config == nil {
185+
continue
186+
}
187+
184188
rawPort := fmt.Sprintf("%v", config.Port)
185189
Port, err := strconv.Atoi(rawPort)
186190
if err == nil {

0 commit comments

Comments
 (0)