proc/native/windows: when there is an error during Attach dbp might be nil
This commit is contained in:
parent
edf4cebe25
commit
2497caea4a
@ -163,7 +163,9 @@ func Attach(pid int) (*Process, error) {
|
||||
}
|
||||
dbp, err := newDebugProcess(New(pid), exepath)
|
||||
if err != nil {
|
||||
dbp.Detach(false)
|
||||
if dbp != nil {
|
||||
dbp.Detach(false)
|
||||
}
|
||||
return nil, err
|
||||
}
|
||||
return dbp, nil
|
||||
|
Loading…
Reference in New Issue
Block a user