svn commit: r582946 - /lenya/trunk/src/modules-core/sitemanagement/java/src/org/apache/lenya/cms/site/usecases/Paste.java

[email protected]
Newsgroups gmane.comp.cms.lenya.cvs
Message-ID <[email protected]>
Author: rfrovarp
Date: Mon Oct  8 12:20:11 2007
New Revision: 582946

URL: http://svn.apache.org/viewvc?rev=582946&view=rev
Log:
Fixed bug 43573 and 43505

Modified:
    lenya/trunk/src/modules-core/sitemanagement/java/src/org/apache/lenya/cms/site/usecases/Paste.java

Modified: lenya/trunk/src/modules-core/sitemanagement/java/src/org/apache/lenya/cms/site/usecases/Paste.java
URL: http://svn.apache.org/viewvc/lenya/trunk/src/modules-core/sitemanagement/java/src/org/apache/lenya/cms/site/usecases/Paste.java?rev=582946&r1=582945&r2=582946&view=diff
==============================================================================
--- lenya/trunk/src/modules-core/sitemanagement/java/src/org/apache/lenya/cms/site/usecases/Paste.java (original)
+++ lenya/trunk/src/modules-core/sitemanagement/java/src/org/apache/lenya/cms/site/usecases/Paste.java Mon Oct  8 12:20:11 2007
@@ -68,10 +68,12 @@
         }
         else if (clipboard.getMethod() == Clipboard.METHOD_CUT) {
             Document doc = getSourceDocument();
-            Document clippedDoc = clipboard.getDocument(getDocumentFactory(), doc.getPublication());
-            String uuid = clippedDoc.getUUID();
-            if (willPasteInOwnSubtree(doc.getLink().getNode(), uuid)) {
-                addErrorMessage("will-paste-in-own-subtree");
+            if(doc != null) {
+                Document clippedDoc = clipboard.getDocument(getDocumentFactory(), doc.getPublication());
+                String uuid = clippedDoc.getUUID();
+                if (willPasteInOwnSubtree(doc.getLink().getNode(), uuid)) {
+                    addErrorMessage("will-paste-in-own-subtree");
+                }
             }
         }
     }
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.