mirror of
https://github.com/JetSetIlly/Gopher2600.git
synced 2024-06-02 20:18:20 -04:00
nilness check for BorrowSource() was done too early
completes changes done in ee1656fc8
This commit is contained in:
parent
d9e0bd0380
commit
5bc7cb809b
|
@ -142,9 +142,10 @@ func (win *winCartStatic) draw(static mapper.CartStatic) {
|
|||
|
||||
if ok {
|
||||
win.img.dbg.CoProcDev.BorrowSource(func(src *dwarf.Source) {
|
||||
if src == nil {
|
||||
return
|
||||
}
|
||||
// the borrowed source instance is used in the after()
|
||||
// function to help decorate the memory cells in the table.
|
||||
// a check for nil is done then
|
||||
|
||||
compData, ok := compStatic.Reference(seg.Name)
|
||||
if ok {
|
||||
// take copy of seg.Name because we'll be accessing it in a PushFunction() below
|
||||
|
@ -172,6 +173,12 @@ func (win *winCartStatic) draw(static mapper.CartStatic) {
|
|||
imgui.PopStyleColorV(popColor)
|
||||
popColor = 0
|
||||
|
||||
// if no source is available then there is nothing
|
||||
// more to do in the after() function
|
||||
if src == nil {
|
||||
return
|
||||
}
|
||||
|
||||
// idx is based on original values of type uint16 so the type conversion is safe
|
||||
addr := seg.Origin + uint32(idx)
|
||||
|
||||
|
|
Loading…
Reference in a new issue