diff --git a/views.s b/views.s index 072f21a..e0b85b9 100644 --- a/views.s +++ b/views.s @@ -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 diff --git a/weegui.dsk b/weegui.dsk index 690924a..de2c741 100644 Binary files a/weegui.dsk and b/weegui.dsk differ