Commit a3b6237a authored by Andy Vawer's avatar Andy Vawer Committed by ROOL
Browse files

Fix crash on closing menu containing a writeable icon with focus as part of the menu tree

* When closing menus, set_caret_position is called to remove the caret from the menu tree
  which tries to redraw the icon without a caret as the window is still defined and valid
* This happens after clearing the menutaskhandle though, so the redraw can't page in the
  right task
* The redraw then fails badly trying to access memory from the wrong task

Version 5.84. Tagged as 'Wimp-5_84'
parent 457906f9
...@@ -9,12 +9,12 @@ ...@@ -9,12 +9,12 @@
GBLS Module_ApplicationDate GBLS Module_ApplicationDate
GBLS Module_HelpVersion GBLS Module_HelpVersion
GBLS Module_ComponentName GBLS Module_ComponentName
Module_MajorVersion SETS "5.83" Module_MajorVersion SETS "5.84"
Module_Version SETA 583 Module_Version SETA 584
Module_MinorVersion SETS "" Module_MinorVersion SETS ""
Module_Date SETS "15 Dec 2021" Module_Date SETS "29 Dec 2021"
Module_ApplicationDate SETS "15-Dec-21" Module_ApplicationDate SETS "29-Dec-21"
Module_ComponentName SETS "Wimp" Module_ComponentName SETS "Wimp"
Module_FullVersion SETS "5.83" Module_FullVersion SETS "5.84"
Module_HelpVersion SETS "5.83 (15 Dec 2021)" Module_HelpVersion SETS "5.84 (29 Dec 2021)"
END END
/* (5.83) /* (5.84)
* *
* This file is automatically maintained by srccommit, do not edit manually. * This file is automatically maintained by srccommit, do not edit manually.
* *
*/ */
#define Module_MajorVersion_CMHG 5.83 #define Module_MajorVersion_CMHG 5.84
#define Module_MinorVersion_CMHG #define Module_MinorVersion_CMHG
#define Module_Date_CMHG 15 Dec 2021 #define Module_Date_CMHG 29 Dec 2021
#define Module_MajorVersion "5.83" #define Module_MajorVersion "5.84"
#define Module_Version 583 #define Module_Version 584
#define Module_MinorVersion "" #define Module_MinorVersion ""
#define Module_Date "15 Dec 2021" #define Module_Date "29 Dec 2021"
#define Module_ApplicationDate "15-Dec-21" #define Module_ApplicationDate "29-Dec-21"
#define Module_ComponentName "Wimp" #define Module_ComponentName "Wimp"
#define Module_FullVersion "5.83" #define Module_FullVersion "5.84"
#define Module_HelpVersion "5.83 (15 Dec 2021)" #define Module_HelpVersion "5.84 (29 Dec 2021)"
#define Module_LibraryVersionInfo "5:83" #define Module_LibraryVersionInfo "5:84"
...@@ -505,11 +505,19 @@ exitsetcaret_abort ...@@ -505,11 +505,19 @@ exitsetcaret_abort
CMP R10,#nullptr CMP R10,#nullptr
LDRNE R0,redrawcareticon LDRNE R0,redrawcareticon
CMPNE R0,#nullptr CMPNE R0,#nullptr
Abs R10,R10,NE BEQ %FT02 ; nothing to redraw
MOVNE R1,#0 Abs R10,R10
MOVNE R2,#0 MOV R1,#0
BLNE int_set_icon_state MOV R2,#0
LDR R14,[R10,#w_taskhandle]
CMP R14,#-1 ; owned by a menu?
LDREQ R14,menutaskhandle
CMPEQ R14,#-4 ; if it's -4 the menu is being deleted, so don't try to redraw
BEQ %FT02
01
Task R14,,"SetCaret"
BL int_set_icon_state
02
; and return ; and return
Pull "R6" ; get saved PSR Pull "R6" ; get saved PSR
Pull "R14" ; taskhandle is remembered Pull "R14" ; taskhandle is remembered
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment