Fix crash using --trim without --split-layers

This commit is contained in:
David Capello 2015-04-22 19:35:06 -03:00
parent fe0b970131
commit a2cbf3f285

View File

@ -395,10 +395,13 @@ void DocumentExporter::captureSamples(Samples& samples)
doc::color_t refColor = 0;
if (m_trimCels) {
if (layer->isBackground())
if (sprite->backgroundLayer() &&
sprite->backgroundLayer()->isVisible()) {
refColor = get_pixel(sampleRender, 0, 0);
else
}
else {
refColor = sprite->transparentColor();
}
}
else if (m_ignoreEmptyCels)
refColor = sprite->transparentColor();