| Index: cc/layers/layer.cc
|
| diff --git a/cc/layers/layer.cc b/cc/layers/layer.cc
|
| index 517a1c6a634511b8774f01d285dcac06f1038d5d..1d53e26d30301008dbd46ad4b5421e03e1a2f58b 100644
|
| --- a/cc/layers/layer.cc
|
| +++ b/cc/layers/layer.cc
|
| @@ -420,6 +420,9 @@ void Layer::SetMaskLayer(Layer* mask_layer) {
|
| }
|
| inputs_.mask_layer = mask_layer;
|
| if (inputs_.mask_layer.get()) {
|
| + // The mask layer should not have any children.
|
| + DCHECK(inputs_.mask_layer->children().empty());
|
| +
|
| inputs_.mask_layer->RemoveFromParent();
|
| DCHECK(!inputs_.mask_layer->parent());
|
| inputs_.mask_layer->SetParent(this);
|
|
|