aboutsummaryrefslogtreecommitdiffstats
path: root/plugin
diff options
context:
space:
mode:
Diffstat (limited to 'plugin')
-rw-r--r--plugin/icedteanp/java/sun/applet/PluginAppletViewer.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/plugin/icedteanp/java/sun/applet/PluginAppletViewer.java b/plugin/icedteanp/java/sun/applet/PluginAppletViewer.java
index ac818d5..8a4f078 100644
--- a/plugin/icedteanp/java/sun/applet/PluginAppletViewer.java
+++ b/plugin/icedteanp/java/sun/applet/PluginAppletViewer.java
@@ -587,6 +587,10 @@ public class PluginAppletViewer extends XEmbeddedFrame
private static synchronized void destroyApplet(int identifier) {
+ // We should not try to destroy an applet during
+ // initialization. It may cause an inconsistent state.
+ waitForAppletInit( applets.get(identifier).panel );
+
PluginDebug.debug("DestroyApplet called for ", identifier);
PAV_INIT_STATUS prev = updateStatus(identifier, PAV_INIT_STATUS.DESTROYED);