Fix assert() when using snap to grid without documents

This commit is contained in:
David Capello 2016-12-05 11:22:43 -03:00
parent b0df5ac3f4
commit a29503aef9

View File

@ -682,7 +682,8 @@ void StatusBar::showTool(int msecs, tools::Tool* tool)
void StatusBar::showSnapToGridWarning(bool state)
{
if (state) {
ASSERT(m_doc);
// m_doc can be null if "snap to grid" command is pressed without
// an opened document. (E.g. to change the default setting)
if (!m_doc)
return;