From: <mar...@us...> - 2009-10-13 10:00:18
|
Revision: 14972 http://cdk.svn.sourceforge.net/cdk/?rev=14972&view=rev Author: mark_rynbeek Date: 2009-10-13 10:00:09 +0000 (Tue, 13 Oct 2009) Log Message: ----------- Modified Paths: -------------- jchempaint/trunk/src/main/org/openscience/jchempaint/action/CopyPasteAction.java Modified: jchempaint/trunk/src/main/org/openscience/jchempaint/action/CopyPasteAction.java =================================================================== --- jchempaint/trunk/src/main/org/openscience/jchempaint/action/CopyPasteAction.java 2009-10-13 09:43:35 UTC (rev 14971) +++ jchempaint/trunk/src/main/org/openscience/jchempaint/action/CopyPasteAction.java 2009-10-13 10:00:09 UTC (rev 14972) @@ -235,11 +235,13 @@ ISimpleChemObjectReader reader = null; String content=null; - try { - content = (String) transfer.getTransferData(DataFlavor.stringFlavor); - reader = new ReaderFactory().createReader(new StringReader(content)); - } catch (Exception e1) { - e1.printStackTrace(); + if (supported(transfer, DataFlavor.stringFlavor) ) { + try { + content = (String) transfer.getTransferData(DataFlavor.stringFlavor); + reader = new ReaderFactory().createReader(new StringReader(content)); + } catch (Exception e1) { + e1.printStackTrace(); + } } // escape for CML - InputStream required. Reader throws error. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |