Fixed possible crash when resizing the map

When the 'mapChanged' signal arrived, it was only checking whether it
came from our current map document. In practice, it should always come
from our current map document, but what we need to check is whether the
current object is the map itself.

Also avoid another potential crash when objects change without having a
current context object.