Deleting unallocated views is now safe and harmless

This commit is contained in:
blondie7575 2017-12-24 08:55:38 -07:00
parent 23272a30fd
commit 2a9945abaf
2 changed files with 5 additions and 2 deletions

View File

@ -331,14 +331,17 @@ WGCreateButton_done:
WGDeleteView:
SAVE_AY
jsr WGEraseView
LDY_ACTIVEVIEW
lda WG_VIEWRECORDS+2,y
beq WGDeleteView_done ; Not an allocated view
jsr WGEraseView
lda #0
sta WG_VIEWRECORDS+2,y ; 0 width indicates unused view
jsr WGViewPaintAll
WGDeleteView_done:
RESTORE_AY
rts

Binary file not shown.