Commit b14c7c1e authored by Boudewijn Rempt's avatar Boudewijn Rempt

Check whether the layer actually has a style before copying

parent bb13dc77
......@@ -894,7 +894,14 @@ void KisLayerManager::layerStyle()
KisLayerSP layer = activeLayer();
if (!layer) return;
KisPSDLayerStyle *style = new KisPSDLayerStyle(*layer->layerStyle());
KisPSDLayerStyle *style = 0;
if (layer->layerStyle()) {
style = new KisPSDLayerStyle(*layer->layerStyle());
}
else {
style = new KisPSDLayerStyle();
}
KisDlgLayerStyle dlg(style);
if (dlg.exec() == QDialog::Accepted) {
layer->setLayerStyle(style);
......
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