AppletLoader: create MediaTracker before requesting image in an attempt to fix a logo loading issue.

This commit is contained in:
kappa1 2011-10-12 22:31:12 +00:00
parent 8bc92abf82
commit 67c3452bb4
1 changed files with 3 additions and 2 deletions

View File

@ -2001,11 +2001,12 @@ public class AppletLoader extends Applet implements Runnable, AppletStub {
*/
public Image getImage(URL url) {
try {
MediaTracker tracker = new MediaTracker(this);
Image image = super.getImage(url);
// wait for image to load
MediaTracker tracker = new MediaTracker(this);
tracker.addImage(image, 0);
tracker.addImage(image, 0);
tracker.waitForAll();
// if no errors return image