Commit 9be19555 authored by Boudewijn Rempt's avatar Boudewijn Rempt

Check result of dynamic_cast

CID:249032
parent f48f1755
......@@ -47,9 +47,12 @@ QString FilterLayer::type() const
void FilterLayer::setFilter(Filter &filter)
{
if (!this->node()) return;
KisAdjustmentLayer *layer = dynamic_cast<KisAdjustmentLayer*>(this->node().data());
//getting the default configuration here avoids trouble with versioning.
layer->setFilter(filter.filterConfig());
if (layer) {
layer->setFilter(filter.filterConfig());
}
}
Filter * FilterLayer::filter()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment