Fix crash on "no level" selected in level strip. (#149)
* Fix crash on no level selected in level strip. * test triggering builds * trigger again * and again
This commit is contained in:
parent
44659103e9
commit
dc7abf6de4
2 changed files with 12 additions and 3 deletions
|
@ -311,6 +311,11 @@ void FullColorBrushTool::leftButtonDown(const TPointD &pos,
|
|||
TTool::Application *app = TTool::getApplication();
|
||||
if (!app) return;
|
||||
TXshLevel *level = app->getCurrentLevel()->getLevel();
|
||||
if (level == NULL) {
|
||||
m_active = false;
|
||||
return;
|
||||
}
|
||||
|
||||
TXshSimpleLevelP simLevel = level->getSimpleLevel();
|
||||
m_assistantPoints = simLevel->getProperties()->getVanishingPoints();
|
||||
|
||||
|
|
|
@ -1247,9 +1247,13 @@ void ToonzRasterBrushTool::leftButtonDown(const TPointD &pos,
|
|||
}
|
||||
|
||||
TXshLevel *level = app->getCurrentLevel()->getLevel();
|
||||
if (level == NULL) {
|
||||
m_active = false;
|
||||
return;
|
||||
}
|
||||
TXshSimpleLevelP simLevel = level->getSimpleLevel();
|
||||
m_assistantPoints = simLevel->getProperties()->getVanishingPoints();
|
||||
|
||||
m_assistantPoints = simLevel->getProperties()->getVanishingPoints();
|
||||
if (e.isAltPressed() && e.isCtrlPressed() && !e.isShiftPressed()) {
|
||||
m_addingAssistant = true;
|
||||
bool deletedPoint = false;
|
||||
|
|
Loading…
Reference in a new issue