diff --git a/src/app/document_api.cpp b/src/app/document_api.cpp index fb74fb0f9..578607b73 100644 --- a/src/app/document_api.cpp +++ b/src/app/document_api.cpp @@ -1208,7 +1208,7 @@ void DocumentApi::clearMask(Cel* cel) if (!image) return; - Layer* layer = cel->layer(); + LayerImage* layer = cel->layer(); Mask* mask = m_document->mask(); color_t bgcolor = bgColor(layer); @@ -1223,7 +1223,7 @@ void DocumentApi::clearMask(Cel* cel) // associated image). else { ASSERT(layer->isImage()); - removeCel(cel); + removeCel(layer, cel); } } else {