Guard set_transient_for for NULL windows
While there should always be a top-level, backtraces provided by some [windows] users show that it can be NULL in some scenarios.
This commit is contained in:
parent
29c6817599
commit
7302aefbee
|
@ -335,7 +335,9 @@ IOPluginWindow::IOPlugUI::edit_plugin (bool custom_ui)
|
|||
_window_proxy->set_custom_ui_mode (custom_ui);
|
||||
_window_proxy->show_the_right_window ();
|
||||
Gtk::Window* tlw = dynamic_cast<Gtk::Window*> (get_toplevel ());
|
||||
_window_proxy->set_transient_for (*tlw);
|
||||
if (tlw) {
|
||||
_window_proxy->set_transient_for (*tlw);
|
||||
}
|
||||
}
|
||||
|
||||
bool
|
||||
|
|
|
@ -288,8 +288,10 @@ PortInsertUI::edit_latency_button_clicked ()
|
|||
different WM's as possible.
|
||||
*/
|
||||
_latency_dialog->set_keep_above (true);
|
||||
_latency_dialog->set_transient_for (*_parent);
|
||||
_latency_dialog->add (*_latency_gui);
|
||||
if (_parent) {
|
||||
_latency_dialog->set_transient_for (*_parent);
|
||||
}
|
||||
}
|
||||
|
||||
_latency_gui->refresh ();
|
||||
|
|
|
@ -4461,7 +4461,9 @@ ProcessorBox::edit_processor (std::shared_ptr<Processor> processor)
|
|||
proxy->show_the_right_window ();
|
||||
|
||||
Gtk::Window* tlw = dynamic_cast<Gtk::Window*> (get_toplevel ());
|
||||
proxy->set_transient_for (*tlw);
|
||||
if (tlw) {
|
||||
proxy->set_transient_for (*tlw);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -4485,7 +4487,9 @@ ProcessorBox::generic_edit_processor (std::shared_ptr<Processor> processor)
|
|||
proxy->show_the_right_window ();
|
||||
|
||||
Gtk::Window* tlw = dynamic_cast<Gtk::Window*> (get_toplevel ());
|
||||
proxy->set_transient_for (*tlw);
|
||||
if (tlw) {
|
||||
proxy->set_transient_for (*tlw);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -4500,8 +4504,9 @@ ProcessorBox::manage_pins (std::shared_ptr<Processor> processor)
|
|||
proxy->get (true);
|
||||
|
||||
Gtk::Window* tlw = dynamic_cast<Gtk::Window*> (get_toplevel ());
|
||||
assert (tlw);
|
||||
proxy->set_transient_for (*tlw);
|
||||
if (tlw) {
|
||||
proxy->set_transient_for (*tlw);
|
||||
}
|
||||
|
||||
proxy->present();
|
||||
}
|
||||
|
|
|
@ -693,7 +693,9 @@ TriggerClipPicker::open_dir ()
|
|||
Gtk::Window* tlw = dynamic_cast<Gtk::Window*> (get_toplevel ());
|
||||
assert (tlw);
|
||||
#ifndef __APPLE__
|
||||
_fcd.set_transient_for (*tlw);
|
||||
if (tlw) {
|
||||
_fcd.set_transient_for (*tlw);
|
||||
}
|
||||
#endif
|
||||
|
||||
int result = _fcd.run ();
|
||||
|
|
Loading…
Reference in New Issue