Fix Palette gizmo crash (#2413)

This commit is contained in:
manongjohn 2018-12-26 20:48:04 -05:00 committed by shun-iwasawa
parent d65f8694d0
commit 55fa854812

View file

@ -361,6 +361,11 @@ void modifyColor(const T &modifier) {
TPaletteHandle *paletteHandle =
TApp::instance()->getPaletteController()->getCurrentLevelPalette();
TPaletteP palette = paletteHandle->getPalette();
if (!palette) {
QMessageBox::warning(0, QObject::tr("Error"),
QObject::tr("No Palette loaded."));
return;
}
if (palette->isLocked()) {
QMessageBox::warning(0, QObject::tr("Warning"),
QObject::tr("Palette is locked."));