[Designer.iOS] Fix an exception when ActiveDocument is null

This happens all the time when pressing cmd-w repeatedly to
close multiple windows in a row.