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:
@@ -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 ();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user