diff --git a/pkg/cmd/codespace/create.go b/pkg/cmd/codespace/create.go index abb9112ba..9d00f205d 100644 --- a/pkg/cmd/codespace/create.go +++ b/pkg/cmd/codespace/create.go @@ -133,7 +133,7 @@ func (a *App) Create(ctx context.Context, opts createOptions) error { billableOwner, err := a.apiClient.GetCodespacePreFlight(ctx, userInputs.Repository) a.StopProgressIndicator() - if billableOwner.Type == "Organization" { + if billableOwner != nil && billableOwner.Type == "Organization" { cs := a.io.ColorScheme() fmt.Fprintln(a.io.Out, cs.Blue("✓ Codespaces usage for this repository is paid for by "+billableOwner.Login)) } else if err != nil {