summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWerner Schweer <ws.seh.de>2008-01-17 14:16:44 +0000
committerWerner Schweer <ws.seh.de>2008-01-17 14:16:44 +0000
commit1da3365cb79005f08b11aa6b020cecd72e84da41 (patch)
tree7c75a39ee85a6b402cbc917eac316d016592c0bc
parent84c3ce58fc618ec7633ab1fcf8e9419c933d600d (diff)
fix crash
-rw-r--r--muse/ChangeLog1
-rw-r--r--muse/muse/arranger/arranger.cpp2
-rw-r--r--muse/muse/track.h15
3 files changed, 12 insertions, 6 deletions
diff --git a/muse/ChangeLog b/muse/ChangeLog
index 6e3d4c81..9c92b9a0 100644
--- a/muse/ChangeLog
+++ b/muse/ChangeLog
@@ -1,4 +1,5 @@
17.1. (ws)
+ - fix crash: loading another song, then Settings->Preferences
- added svn revision number to "About" box
- changed version number to 2.0.1, install to muse-2.0
- routing pulldown menu in mixer will stay if SHIFT is pressed while clicking;
diff --git a/muse/muse/arranger/arranger.cpp b/muse/muse/arranger/arranger.cpp
index 359f6580..51e0324c 100644
--- a/muse/muse/arranger/arranger.cpp
+++ b/muse/muse/arranger/arranger.cpp
@@ -913,11 +913,13 @@ void Arranger::startLoadSong()
ArrangerTrack* at = &(*i)->arrangerTrack;
tl->removeWidget(at->tw);
at->tw->close();
+ delete at->tw;
at->tw = 0;
for (iArrangerTrack it = (*i)->subtracks.begin(); it != (*i)->subtracks.end(); ++it) {
ArrangerTrack* at = *it;
tl->removeWidget(at->tw);
at->tw->close();
+ delete at->tw;
}
(*i)->subtracks.clear();
}
diff --git a/muse/muse/track.h b/muse/muse/track.h
index e8e14dfc..276929c2 100644
--- a/muse/muse/track.h
+++ b/muse/muse/track.h
@@ -118,7 +118,7 @@ class Track : public QObject {
bool _off;
bool _monitor;
int _channels; // 1 - mono, 2 - stereo
- // Note: midi out/in tracks have
+ // Note: midi out/in tracks have
// 1 channel
CtrlRecList _recEvents; // recorded automation events
double _meter[MAX_CHANNELS];
@@ -171,7 +171,10 @@ class Track : public QObject {
TType timeType() const { return _tt; }
void setTimeType(TType t) { _tt = t; }
- QString cname() const { return QString(_cname[type()]); }
+ QString cname() const {
+ int t = type();
+ return QString(_cname[t]);
+ }
QString clname() const { return QString(_clname[type()]); }
//
@@ -314,11 +317,11 @@ class Track : public QObject {
Port alsaPort(int channel = 0) const { return _alsaPort[channel]; }
Port jackPort(int channel = 0) const { return _jackPort[channel]; }
- void setAlsaPort(const Port& port, int channel = 0) {
- _alsaPort[channel] = port;
+ void setAlsaPort(const Port& port, int channel = 0) {
+ _alsaPort[channel] = port;
}
- void setJackPort(const Port& port, int channel = 0) {
- _jackPort[channel] = port;
+ void setJackPort(const Port& port, int channel = 0) {
+ _jackPort[channel] = port;
}
struct ArrangerTrack arrangerTrack;