classes derived from WindowProxy are responsible for their own window creation in ::set_state().

Fixes a crash reported by A.Prokoudine when opening a session with visible plugin GUIs
This commit is contained in:
Paul Davis 2015-07-15 14:08:52 -04:00
parent 88fb3c5ac9
commit e46b518319

View file

@ -97,6 +97,8 @@ WindowProxy::set_state (const XMLNode& node, int /* version */)
XMLProperty* prop;
std::cerr << " PB setting state\n";
if ((prop = (*i)->property (X_("visible"))) != 0) {
_visible = PBD::string_is_affirmative (prop->value ());
}
@ -115,14 +117,6 @@ WindowProxy::set_state (const XMLNode& node, int /* version */)
}
}
/* if the window is marked visible but doesn't yet exist, create it */
if (_visible) {
if (!_window) {
_window = get (true);
}
}
if (_window) {
setup ();
}