Catch exception if we cannot change the selection transparent color

We have a memory crash dump where wasn't possible to change the
selection transparent color because the data recovery thread was creating
the sprite backup.
This commit is contained in:
David Capello 2015-08-12 15:26:49 -03:00
parent 847fc58a01
commit 2eb757995d

View File

@ -551,8 +551,13 @@ void MovingPixelsState::setTransparentColor(bool opaque, const app::Color& color
Layer* layer = m_editor->layer();
ASSERT(layer);
m_pixelsMovement->setMaskColor(
opaque, color_utils::color_for_target_mask(color, ColorTarget(layer)));
try {
m_pixelsMovement->setMaskColor(
opaque, color_utils::color_for_target_mask(color, ColorTarget(layer)));
}
catch (const LockedDocumentException& ex) {
Console::showException(ex);
}
}
void MovingPixelsState::dropPixels()