mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-24 23:47:39 +01:00
various minor fixes for crashes reported by nowhiskey
git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@3486 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
422607acfe
commit
b52004a777
3 changed files with 37 additions and 23 deletions
|
|
@ -129,9 +129,9 @@ GainMeterBase::GainMeterBase (boost::shared_ptr<IO> io, Session& s,
|
|||
gain_automation_state_button.set_size_request(15, 15);
|
||||
gain_automation_style_button.set_size_request(15, 15);
|
||||
|
||||
Route* r;
|
||||
boost::shared_ptr<Route> r;
|
||||
|
||||
if ((r = dynamic_cast<Route*> (_io.get())) != 0) {
|
||||
if ((r = boost::dynamic_pointer_cast<Route> (_io)) != 0) {
|
||||
|
||||
if (!r->hidden()) {
|
||||
|
||||
|
|
@ -247,8 +247,9 @@ GainMeterBase::peak_button_release (GdkEventButton* ev)
|
|||
if (ev->button == 1 && Keyboard::modifier_state_equals (ev->state, Keyboard::PrimaryModifier|Keyboard::TertiaryModifier)) {
|
||||
ResetAllPeakDisplays ();
|
||||
} else if (ev->button == 1 && Keyboard::modifier_state_equals (ev->state, Keyboard::PrimaryModifier)) {
|
||||
Route* r;
|
||||
if ((r = dynamic_cast<Route*> (_io.get())) != 0) {
|
||||
boost::shared_ptr<Route> r;
|
||||
|
||||
if ((r = boost::dynamic_pointer_cast<Route> (_io)) != 0) {
|
||||
ResetGroupPeakDisplays (r->mix_group());
|
||||
}
|
||||
} else {
|
||||
|
|
@ -261,8 +262,9 @@ GainMeterBase::peak_button_release (GdkEventButton* ev)
|
|||
void
|
||||
GainMeterBase::reset_peak_display ()
|
||||
{
|
||||
Route * r;
|
||||
if ((r = dynamic_cast<Route*> (_io.get())) != 0) {
|
||||
boost::shared_ptr<Route> r;
|
||||
|
||||
if ((r = boost::dynamic_pointer_cast<Route> (_io)) != 0) {
|
||||
r->reset_max_peak_meters();
|
||||
}
|
||||
|
||||
|
|
@ -275,8 +277,9 @@ GainMeterBase::reset_peak_display ()
|
|||
void
|
||||
GainMeterBase::reset_group_peak_display (RouteGroup* group)
|
||||
{
|
||||
Route* r;
|
||||
if ((r = dynamic_cast<Route*> (_io.get())) != 0) {
|
||||
boost::shared_ptr<Route> r;
|
||||
|
||||
if ((r = boost::dynamic_pointer_cast<Route> (_io)) != 0) {
|
||||
if (group == r->mix_group()) {
|
||||
reset_peak_display ();
|
||||
}
|
||||
|
|
@ -420,11 +423,11 @@ next_meter_point (MeterPoint mp)
|
|||
gint
|
||||
GainMeterBase::meter_press(GdkEventButton* ev)
|
||||
{
|
||||
Route* _route;
|
||||
boost::shared_ptr<Route> _route;
|
||||
|
||||
wait_for_release = false;
|
||||
|
||||
if ((_route = dynamic_cast<Route*>(_io.get())) == 0) {
|
||||
|
||||
if ((_route = boost::dynamic_pointer_cast<Route>(_io)) == 0) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
|
@ -495,13 +498,18 @@ GainMeterBase::meter_press(GdkEventButton* ev)
|
|||
gint
|
||||
GainMeterBase::meter_release(GdkEventButton* ev)
|
||||
{
|
||||
|
||||
if(!ignore_toggle){
|
||||
if (wait_for_release){
|
||||
wait_for_release = false;
|
||||
set_meter_point (*(dynamic_cast<Route*>(_io.get())), old_meter_point);
|
||||
|
||||
boost::shared_ptr<Route> r;
|
||||
|
||||
if ((r = boost::dynamic_pointer_cast<Route>(_io)) != 0) {
|
||||
set_meter_point (*r, old_meter_point);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
@ -526,10 +534,10 @@ GainMeterBase::set_mix_group_meter_point (Route& route, MeterPoint mp)
|
|||
void
|
||||
GainMeterBase::meter_point_clicked ()
|
||||
{
|
||||
Route* r;
|
||||
|
||||
if ((r = dynamic_cast<Route*> (_io.get())) != 0) {
|
||||
boost::shared_ptr<Route> r;
|
||||
|
||||
if ((r = boost::dynamic_pointer_cast<Route> (_io)) != 0) {
|
||||
/* WHAT? */
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -644,7 +652,6 @@ GainMeterBase::_astyle_string (AutoStyle style, bool shrt)
|
|||
void
|
||||
GainMeterBase::gain_automation_style_changed ()
|
||||
{
|
||||
// Route* _route = dynamic_cast<Route*>(&_io);
|
||||
switch (_width) {
|
||||
case Wide:
|
||||
gain_automation_style_button.set_label (astyle_string(_io->gain_automation_curve().automation_style()));
|
||||
|
|
@ -765,10 +772,10 @@ GainMeter::GainMeter (boost::shared_ptr<IO> io, Session& s)
|
|||
hbox.set_spacing (2);
|
||||
hbox.pack_start (*fader_vbox, true, true);
|
||||
|
||||
Route* r;
|
||||
|
||||
if ((r = dynamic_cast<Route*> (_io.get())) != 0) {
|
||||
boost::shared_ptr<Route> r;
|
||||
|
||||
if ((r = boost::dynamic_pointer_cast<Route> (_io)) != 0) {
|
||||
|
||||
/*
|
||||
if we have a non-hidden route (ie. we're not the click or the auditioner),
|
||||
pack some route-dependent stuff.
|
||||
|
|
|
|||
|
|
@ -87,7 +87,6 @@ RegionView::RegionView (const RegionView& other)
|
|||
/* derived concrete type will call init () */
|
||||
|
||||
_region = other._region;
|
||||
editor = other.editor;
|
||||
current_visible_sync_position = other.current_visible_sync_position;
|
||||
valid = false;
|
||||
_pixel_width = other._pixel_width;
|
||||
|
|
@ -104,7 +103,6 @@ RegionView::RegionView (const RegionView& other, boost::shared_ptr<Region> other
|
|||
/* derived concrete type will call init () */
|
||||
|
||||
_region = other_region;
|
||||
editor = other.editor;
|
||||
current_visible_sync_position = other.current_visible_sync_position;
|
||||
valid = false;
|
||||
_pixel_width = other._pixel_width;
|
||||
|
|
@ -135,6 +133,7 @@ RegionView::RegionView (ArdourCanvas::Group* parent,
|
|||
void
|
||||
RegionView::init (Gdk::Color& basic_color, bool wfd)
|
||||
{
|
||||
editor = 0;
|
||||
valid = true;
|
||||
in_destructor = false;
|
||||
_height = 0;
|
||||
|
|
|
|||
|
|
@ -1227,8 +1227,16 @@ AudioEngine::reconnect_to_jack ()
|
|||
for (PortConnections::iterator i = port_connections.begin(); i != port_connections.end(); ++i) {
|
||||
|
||||
int err;
|
||||
jack_client_t* j = _jack;
|
||||
|
||||
/* JACK could have zombified us. */
|
||||
|
||||
if (!j) {
|
||||
error << _("Disconnected from JACK while reconnecting. You should quit Ardour now.") << endmsg;
|
||||
return -1;
|
||||
}
|
||||
|
||||
if ((err = jack_connect (_jack, (*i).first.c_str(), (*i).second.c_str())) != 0) {
|
||||
if ((err = jack_connect (j, (*i).first.c_str(), (*i).second.c_str())) != 0) {
|
||||
if (err != EEXIST) {
|
||||
error << string_compose (_("could not reconnect %1 and %2 (err = %3)"),
|
||||
(*i).first, (*i).second, err)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue