delete session XML object after loading and setting state.

This commit is contained in:
Robin Gareus 2014-09-10 05:18:09 +02:00 committed by Paul Davis
parent d7858c8b1e
commit 04a647f47a

View file

@ -1171,7 +1171,7 @@ Session::set_state (const XMLNode& node, int version)
if (node.name() != X_("Session")) {
fatal << _("programming error: Session: incorrect XML node sent to set_state()") << endmsg;
return -1;
goto out;
}
if ((prop = node.property ("name")) != 0) {
@ -1185,7 +1185,7 @@ Session::set_state (const XMLNode& node, int version)
if (_nominal_frame_rate != _current_frame_rate) {
boost::optional<int> r = AskAboutSampleRateMismatch (_nominal_frame_rate, _current_frame_rate);
if (r.get_value_or (0)) {
return -1;
goto out;
}
}
}
@ -1378,9 +1378,13 @@ Session::set_state (const XMLNode& node, int version)
StateReady (); /* EMIT SIGNAL */
delete state_tree;
state_tree = 0;
return 0;
out:
delete state_tree;
state_tree = 0;
return ret;
}