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