handle rare case when graphics object is null