summaryrefslogtreecommitdiff
path: root/gtk2_ardour/automation_time_axis.cc
diff options
context:
space:
mode:
authorNick Mainsbridge <beatroute@iprimus.com.au>2008-10-13 20:32:58 +0000
committerNick Mainsbridge <beatroute@iprimus.com.au>2008-10-13 20:32:58 +0000
commite43d43a42e9e890843f72f89884c949f3105addf (patch)
tree968490214226dd3b48d38dd72fd20798b8c1f6e4 /gtk2_ardour/automation_time_axis.cc
parent027261bc33ee826b680066a92e1e79467dd9f15d (diff)
set tempo lines to be physical_screen_height high, add xml null check.
git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@3962 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/automation_time_axis.cc')
-rw-r--r--gtk2_ardour/automation_time_axis.cc9
1 files changed, 7 insertions, 2 deletions
diff --git a/gtk2_ardour/automation_time_axis.cc b/gtk2_ardour/automation_time_axis.cc
index f67dd96034..06a6e6c73c 100644
--- a/gtk2_ardour/automation_time_axis.cc
+++ b/gtk2_ardour/automation_time_axis.cc
@@ -305,7 +305,10 @@ AutomationTimeAxisView::set_height (uint32_t h)
bool changed_between_small_and_normal = ( (h == hSmall || h == hSmaller) ^ (height == hSmall || height == hSmaller) );
TimeAxisView* state_parent = get_parent_with_state ();
- XMLNode* xml_node = state_parent->get_child_xml_node (_state_name);
+ XMLNode* xml_node;
+ if (state_parent) {
+ xml_node = state_parent->get_child_xml_node (_state_name);
+ }
TimeAxisView::set_height (h);
base_rect->property_y2() = h;
@@ -320,7 +323,9 @@ AutomationTimeAxisView::set_height (uint32_t h)
char buf[32];
snprintf (buf, sizeof (buf), "%u", height);
- xml_node->add_property ("height", buf);
+ if (xml_node) {
+ xml_node->add_property ("height", buf);
+ }
if (changed_between_small_and_normal || first_call_to_set_height) {
first_call_to_set_height = false;