Fixes a problem where detaching and reattaching a RichTechArea would cause an NPE; cross platform.  This really needs to be fixed the right way after the RC so that initialization is totally separate from attachment.

Review by: jgw


git-svn-id: https://google-web-toolkit.googlecode.com/svn/trunk@1180 8db76d5a-ed1c-0410-87a9-c151d255dfc7
diff --git a/user/src/com/google/gwt/user/client/ui/impl/RichTextAreaImplStandard.java b/user/src/com/google/gwt/user/client/ui/impl/RichTextAreaImplStandard.java
index 1d98669..0f7a742 100644
--- a/user/src/com/google/gwt/user/client/ui/impl/RichTextAreaImplStandard.java
+++ b/user/src/com/google/gwt/user/client/ui/impl/RichTextAreaImplStandard.java
@@ -275,8 +275,10 @@
 
   void onElementInitialized() {
     // When the iframe is ready, ensure cached content is set.
-    setHTMLImpl(DOM.getInnerHTML(beforeInitPlaceholder));
-    beforeInitPlaceholder = null;
+    if (beforeInitPlaceholder != null) {
+      setHTMLImpl(DOM.getInnerHTML(beforeInitPlaceholder));
+      beforeInitPlaceholder = null;
+    }
   }
 
   boolean queryCommandState(String cmd) {