Revision: 4030
          http://vexi.svn.sourceforge.net/vexi/?rev=4030&view=rev
Author:   clrg
Date:     2011-02-09 14:46:56 +0000 (Wed, 09 Feb 2011)

Log Message:
-----------
Only init() after confirming Picture isLoaded

Modified Paths:
--------------
    trunk/org.vexi-core.main/src/main/java/org/vexi/plat/AWT.java

Modified: trunk/org.vexi-core.main/src/main/java/org/vexi/plat/AWT.java
===================================================================
--- trunk/org.vexi-core.main/src/main/java/org/vexi/plat/AWT.java       
2011-02-09 14:38:18 UTC (rev 4029)
+++ trunk/org.vexi-core.main/src/main/java/org/vexi/plat/AWT.java       
2011-02-09 14:46:56 UTC (rev 4030)
@@ -417,14 +417,16 @@
             if (i==null) {
                 frame.setIconImage(new ImageIcon(Surface.vexiIcon).getImage());
             } else {
-                // must init() otherwise ((AWTPicture)i).i is null
-                ((AWTPicture)i).init();
                 if (i.isLoaded) {
+                    // must init() otherwise ((AWTPicture)i).i is null
+                    ((AWTPicture)i).init();
                     frame.setIconImage(((AWTPicture)i).i);
                 } else {
                     Main.SCHEDULER.add(new Callable() {
                         public Object run(Object o) throws Exception {
                             if (i.isLoaded) {
+                                // must init() otherwise ((AWTPicture)i).i is 
null
+                                ((AWTPicture)i).init();
                                 frame.setIconImage(((AWTPicture)i).i);
                             } else {
                                 Main.SCHEDULER.add(this);


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

------------------------------------------------------------------------------
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
_______________________________________________
Vexi-svn mailing list
Vexi-svn@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/vexi-svn

Reply via email to