Commit 87ea8ac2 authored by Robert Sprowson's avatar Robert Sprowson
Browse files

Don't access 0xFFFFFFFE if window vanished

The pointer left/entered window logic calls int_get_pointer_info which can return a window (and/or icon) handle of -1 if the pointer is over no window, such as might occur if the window has been deleted.
The check for a duff window handle (in R3) was unfortunately made *after* it'd been dereferenced. Move this check up beforehand.

Fixes issue reported on Usenet https://groups.google.com/forum/#!topic/comp.sys.acorn.programmer/iR0_TNekiKg

Version 5.63. Tagged as 'Wimp-5_63'
parent 39485b7c
;
; This file is automatically maintained by srccommit, do not edit manually.
; Last processed by srccommit version: 1.1.
;
GBLS Module_MajorVersion
GBLA Module_Version
......@@ -10,14 +9,12 @@
GBLS Module_ApplicationDate
GBLS Module_HelpVersion
GBLS Module_ComponentName
GBLS Module_ComponentPath
Module_MajorVersion SETS "5.62"
Module_Version SETA 562
Module_MajorVersion SETS "5.63"
Module_Version SETA 563
Module_MinorVersion SETS ""
Module_Date SETS "01 Jul 2018"
Module_ApplicationDate SETS "01-Jul-18"
Module_Date SETS "05 Jun 2019"
Module_ApplicationDate SETS "05-Jun-19"
Module_ComponentName SETS "Wimp"
Module_ComponentPath SETS "castle/RiscOS/Sources/Desktop/Wimp"
Module_FullVersion SETS "5.62"
Module_HelpVersion SETS "5.62 (01 Jul 2018)"
Module_FullVersion SETS "5.63"
Module_HelpVersion SETS "5.63 (05 Jun 2019)"
END
/* (5.62)
/* (5.63)
*
* This file is automatically maintained by srccommit, do not edit manually.
* Last processed by srccommit version: 1.1.
*
*/
#define Module_MajorVersion_CMHG 5.62
#define Module_MajorVersion_CMHG 5.63
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG 01 Jul 2018
#define Module_Date_CMHG 05 Jun 2019
#define Module_MajorVersion "5.62"
#define Module_Version 562
#define Module_MajorVersion "5.63"
#define Module_Version 563
#define Module_MinorVersion ""
#define Module_Date "01 Jul 2018"
#define Module_Date "05 Jun 2019"
#define Module_ApplicationDate "01-Jul-18"
#define Module_ApplicationDate "05-Jun-19"
#define Module_ComponentName "Wimp"
#define Module_ComponentPath "castle/RiscOS/Sources/Desktop/Wimp"
#define Module_FullVersion "5.62"
#define Module_HelpVersion "5.62 (01 Jul 2018)"
#define Module_LibraryVersionInfo "5:62"
#define Module_FullVersion "5.63"
#define Module_HelpVersion "5.63 (05 Jun 2019)"
#define Module_LibraryVersionInfo "5:63"
......@@ -1354,6 +1354,9 @@ notdragging
Push "R0-R7,handle"
CMP R3,#nullptr
BEQ %FT90
Abs R14,R3
LDR R14,[R14,#w_taskhandle]
CMP R14,#-1 ; is the task -1, ie. owned by a menu
......@@ -1368,13 +1371,9 @@ notdragging
STRB R14, submenuopenedbyclick
]
01
CMP R3,#nullptr
BEQ %FT90
CMP R4,#nullptr
CMPNE R4,#nullptr2
BEQ %FT90
; TST R3,#1
; BEQ %FT90
Debug bo,"New window,icon",r3,r4
......
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