Resolves: rhbz#1050162 don't draw to NULL window

Change-Id: Ia84e3ae05f2d3eacfb48136ce920173b46783bc7