Commit 58d5bd39 authored by Hugo Beauzee-Luyssen's avatar Hugo Beauzee-Luyssen
Browse files

Solved crash when trying to backup an unnamed project

parent 992bb73d
......@@ -255,8 +255,15 @@ void ProjectManager::nameChanged( const QVariant& name )
void ProjectManager::emergencyBackup()
{
QString name = m_projectFile->fileName();
name += "~";
__saveProject( name );
qDebug() << "Emergency backup succeeded";
if ( m_projectFile != NULL )
{
QString name = m_projectFile->fileName();
name += "backup";
__saveProject( name );
}
else
{
QString name = QDir::currentPath() + "unsavedproject.vlmcbackup";
__saveProject( name );
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment