diff --git a/src/core/operationstack.cpp b/src/core/operationstack.cpp index 18ff942..32fc330 100644 --- a/src/core/operationstack.cpp +++ b/src/core/operationstack.cpp @@ -460,10 +460,13 @@ bool OperationStack::contains(const Partition* p) const foreach(Operation * o, operations()) { if (o->targets(*p)) return true; + CopyOperation* copyOp = dynamic_cast(o); - const Partition* source = ©Op->sourcePartition(); - if (source == p) - return true; + if (copyOp) { + const Partition* source = ©Op->sourcePartition(); + if (source == p) + return true; + } } return false;