On a slow machine, there's a NullException as getGraphics() returns after

UI disappears.
This commit is contained in:
grail%cafebabe.org 1999-02-19 16:18:41 +00:00
parent b553b3670f
commit abe3909f53

View File

@ -41,8 +41,11 @@ public class Animation extends Component implements Runnable
{
try
{
Graphics g;
fThread.sleep(100);
paint(getGraphics());
g = getGraphics();
if (g != null)
paint(getGraphics());
fCurrent++;
fCurrent %= fGlyphs.length;
if (fCurrent == 0)