Return null if deserializing an export timespan doesn't succeed with at least one...
authorSakari Bergen <sakari.bergen@beatwaves.net>
Sun, 26 May 2013 18:25:22 +0000 (21:25 +0300)
committerSakari Bergen <sakari.bergen@beatwaves.net>
Sun, 26 May 2013 18:25:22 +0000 (21:25 +0300)
This should fix an issue with loading old sessions using the old way of
handling session ranges specially.

libs/ardour/export_profile_manager.cc

index bc4b31e3244501ba8fc233faac52d017ccefe59a..42e494c0cb3c9e1d56f289085149c3d7cae0f678 100644 (file)
@@ -437,6 +437,10 @@ ExportProfileManager::deserialize_timespan (XMLNode & root)
                state->time_format = (TimeFormat) string_2_enum (prop->value(), TimeFormat);
        }
 
+       if (state->timespans->empty()) {
+               return TimespanStatePtr();
+       }
+
        return state;
 }