mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-11 17:16:38 +01:00
delete session XML object after loading and setting state.
This commit is contained in:
parent
cab09d87b8
commit
d421602c24
1 changed files with 6 additions and 2 deletions
|
|
@ -1143,7 +1143,7 @@ Session::set_state (const XMLNode& node, int version)
|
||||||
|
|
||||||
if (node.name() != X_("Session")) {
|
if (node.name() != X_("Session")) {
|
||||||
fatal << _("programming error: Session: incorrect XML node sent to set_state()") << endmsg;
|
fatal << _("programming error: Session: incorrect XML node sent to set_state()") << endmsg;
|
||||||
return -1;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((prop = node.property ("name")) != 0) {
|
if ((prop = node.property ("name")) != 0) {
|
||||||
|
|
@ -1157,7 +1157,7 @@ Session::set_state (const XMLNode& node, int version)
|
||||||
if (_nominal_frame_rate != _current_frame_rate) {
|
if (_nominal_frame_rate != _current_frame_rate) {
|
||||||
boost::optional<int> r = AskAboutSampleRateMismatch (_nominal_frame_rate, _current_frame_rate);
|
boost::optional<int> r = AskAboutSampleRateMismatch (_nominal_frame_rate, _current_frame_rate);
|
||||||
if (r.get_value_or (0)) {
|
if (r.get_value_or (0)) {
|
||||||
return -1;
|
goto out;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1350,9 +1350,13 @@ Session::set_state (const XMLNode& node, int version)
|
||||||
|
|
||||||
StateReady (); /* EMIT SIGNAL */
|
StateReady (); /* EMIT SIGNAL */
|
||||||
|
|
||||||
|
delete state_tree;
|
||||||
|
state_tree = 0;
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
out:
|
out:
|
||||||
|
delete state_tree;
|
||||||
|
state_tree = 0;
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue