Moved the dereferencing of a window pointer to after the check for its
commit9c69714eec3561088540ca089de8bc5d6fa776f0
authorneil <neil@fb15a70f-31f2-0310-bbcc-cdcc74a49acc>
Mon, 3 Nov 2014 02:16:23 +0000 (3 02:16 +0000)
committerneil <neil@fb15a70f-31f2-0310-bbcc-cdcc74a49acc>
Mon, 3 Nov 2014 02:16:23 +0000 (3 02:16 +0000)
tree7f9a31cd55177073ec6eed6d6ad8d8fa7fe1ef15
parent3d44500a3353feb619342088f960424e2bdea1ef
Moved the dereferencing of a window pointer to after the check for its
being non-NULL. Previously, the NULL check was being optimised away by
GCC (presumably the thinking is: if it's already been dereferenced, it
must be non-NULL), leading to a race condition that sometimes caused
BOOPSI method calls to an invalid monitor (i.e. screen) object. This
fixes the crash sometimes seen when changing screen mode when DOpus
Magellan is used as a Workbench replacement.

git-svn-id: https://svn.aros.org/svn/aros/trunk/AROS@49749 fb15a70f-31f2-0310-bbcc-cdcc74a49acc
rom/intuition/inputhandler.c