res:dock:: fix exception for undefined activeWindow.

sometimes activeWindow is undefined.

Change-Id: I19b9d974818feb26d2c735367c5aa403fec7af7f