Also need to cope with non-component _root in BackFrameManager

git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@228 ed5b42cb-e716-0410-a449-f6a68f950b19
This commit is contained in:
Mike Thomas
2007-05-04 23:14:26 +00:00
parent 2c6fdf5d94
commit 8a2e67831e
@@ -85,7 +85,8 @@ public class BackFrameManager extends FrameManager
// we cache our frame's graphics object so that we can avoid
// instantiating a new one on every tick
if (_fgfx == null) {
_fgfx = (Graphics2D)((Component)_root).getGraphics();
Component comp = (_root instanceof Component) ? (Component)_root : _window;
_fgfx = (Graphics2D)(comp.getGraphics());
}
_fgfx.drawImage(_backimg, 0, 0, null);