Comment 10 for bug 533872

Revision history for this message
Robert Dyer (psybers) wrote :

@Rico: read the code carefully, and realize that evaluations 'short circuit' and thus if screen.ActiveWindow == null the rest of that expression wont even be evaluated, so we dont get a NPE.

rev1094 has this:
(screen.ActiveWindow == null || (screen.ActiveWindow != null && !screen.ActiveWindow.IsFullscreen))

rev1172 has this:
(screen.ActiveWindow == null || !screen.ActiveWindow.IsFullscreen || !WindowIntersectingOther)

which if we ignore the 'new' check, is this:
(screen.ActiveWindow == null || !screen.ActiveWindow.IsFullscreen)

But like I said, the == null check in 1094 (and still in 1172) will short-circuit the expression and thus screen.ActiveWindow.IsFullscreen only executes if screen.ActiveWindow != null (because if it is null, the whole expression is immediately true and we dont have to even check the RHS).