Skip to content

Commit

Permalink
nes: fix panic when tracing is enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
cornelk committed Dec 11, 2024
1 parent f1e5b7d commit 6b1af36
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkg/nes/option.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package nes

import (
"io"
"os"

"github.com/retroenv/retrogolib/arch/nes/cartridge"
)
Expand Down Expand Up @@ -34,6 +35,10 @@ func NewOptions(optionList ...Option) *Options {
option(opts)
}

if opts.tracing && opts.tracingTarget == nil {
opts.tracingTarget = os.Stdout
}

return opts
}

Expand Down

0 comments on commit 6b1af36

Please sign in to comment.