projects
/
ardour.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
3ddd797
)
prevent negative playhead positions from entering code via serialized state
author
Paul Davis
<paul@linuxaudiosystems.com>
Wed, 22 Oct 2014 16:17:59 +0000
(12:17 -0400)
committer
Paul Davis
<paul@linuxaudiosystems.com>
Wed, 22 Oct 2014 21:07:11 +0000
(17:07 -0400)
gtk2_ardour/editor.cc
patch
|
blob
|
history
diff --git
a/gtk2_ardour/editor.cc
b/gtk2_ardour/editor.cc
index bf6b9bd02178d59711ce4bcde57993afff417161..eaf55bcc1c5d11632bedfe99ec9f4ad14802123b 100644
(file)
--- a/
gtk2_ardour/editor.cc
+++ b/
gtk2_ardour/editor.cc
@@
-2203,7
+2203,12
@@
Editor::set_state (const XMLNode& node, int /*version*/)
if (_session && (prop = node.property ("playhead"))) {
framepos_t pos;
sscanf (prop->value().c_str(), "%" PRIi64, &pos);
- playhead_cursor->set_position (pos);
+ if (pos >= 0) {
+ playhead_cursor->set_position (pos);
+ } else {
+ warning << _("Playhead position stored with a negative value - ignored (use zero instead)") << endmsg;
+ playhead_cursor->set_position (0);
+ }
} else {
playhead_cursor->set_position (0);
}