summaryrefslogtreecommitdiff
path: root/gtk2_ardour/ardour_ui.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2008-11-30 23:15:03 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2008-11-30 23:15:03 +0000
commit54a96bb67521e3fc633babe6d9aea86113eb2c74 (patch)
tree8ca1137abc9e901936f51a38d8d8fea43ce86efe /gtk2_ardour/ardour_ui.cc
parent6d6841bc36d7bd5017715c0b1dac0b381d54f41e (diff)
do not crash in xrun handler when there is no session
git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@4272 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/ardour_ui.cc')
-rw-r--r--gtk2_ardour/ardour_ui.cc8
1 files changed, 6 insertions, 2 deletions
diff --git a/gtk2_ardour/ardour_ui.cc b/gtk2_ardour/ardour_ui.cc
index 125fd18a77..32088800df 100644
--- a/gtk2_ardour/ardour_ui.cc
+++ b/gtk2_ardour/ardour_ui.cc
@@ -2946,13 +2946,17 @@ ARDOUR_UI::halt_on_xrun_message ()
void
ARDOUR_UI::xrun_handler(nframes_t where)
{
+ if (!session) {
+ return;
+ }
+
ENSURE_GUI_THREAD (bind(mem_fun(*this, &ARDOUR_UI::xrun_handler), where));
- if (Config->get_create_xrun_marker() && session->actively_recording()) {
+ if (session && Config->get_create_xrun_marker() && session->actively_recording()) {
create_xrun_marker(where);
}
- if (Config->get_stop_recording_on_xrun() && session->actively_recording()) {
+ if (session && Config->get_stop_recording_on_xrun() && session->actively_recording()) {
halt_on_xrun_message ();
}
}