Fixed crash in multi snapshots to file

This commit is contained in:
Jacob Støren 2017-03-31 15:13:13 +02:00
parent 442d9d2e41
commit e679b551c9

View File

@ -208,7 +208,16 @@ void RicSnapshotAllPlotsToFileFeature::exportSnapshotOfAllPlotsIntoFolder(QStrin
{
if (viewWindow->isMdiWindow() && viewWindow->viewWidget())
{
QString fileName = viewWindow->userDescriptionField()->uiCapability()->uiValue().toString();
QString fileName;
if ( viewWindow->userDescriptionField())
{
fileName = viewWindow->userDescriptionField()->uiCapability()->uiValue().toString();
}
else
{
fileName = viewWindow->uiCapability()->uiName();
}
fileName = caf::Utils::makeValidFileBasename(fileName);
QString absoluteFileName = caf::Utils::constructFullFileName(absSnapshotPath, fileName, ".png");