mirror of
https://github.com/hneemann/Digital.git
synced 2025-09-29 07:50:29 -04:00
fixed a nullpointer during copy and paste
This commit is contained in:
parent
f83d26dc31
commit
7877c2de4f
@ -77,6 +77,9 @@ public class CircuitTransferable implements Transferable {
|
||||
Vector max = null;
|
||||
try (Reader in = new StringReader(data.toString())) {
|
||||
ArrayList<Moveable> elements = (ArrayList<Moveable>) xStream.fromXML(in);
|
||||
if (elements == null)
|
||||
return null;
|
||||
|
||||
for (Moveable m : elements)
|
||||
if (m instanceof VisualElement) {
|
||||
((VisualElement) m).setShapeFactory(shapeFactory);
|
||||
|
Loading…
x
Reference in New Issue
Block a user