aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/adlmidi_private.hpp18
1 files changed, 12 insertions, 6 deletions
diff --git a/src/adlmidi_private.hpp b/src/adlmidi_private.hpp
index 3aaeaf0..ed654ac 100644
--- a/src/adlmidi_private.hpp
+++ b/src/adlmidi_private.hpp
@@ -781,15 +781,21 @@ public:
AdlChannel(const AdlChannel &oth): koff_time_until_neglible(oth.koff_time_until_neglible)
{
- users_assign(oth.users_first, oth.users_size);
+ if(oth.users_first)
+ {
+ users_first = NULL;
+ users_assign(oth.users_first, oth.users_size);
+ }
+ else
+ users_clear();
}
AdlChannel &operator=(const AdlChannel &oth)
- {
- koff_time_until_neglible = oth.koff_time_until_neglible;
- users_assign(oth.users_first, oth.users_size);
- return *this;
- }
+ {
+ koff_time_until_neglible = oth.koff_time_until_neglible;
+ users_assign(oth.users_first, oth.users_size);
+ return *this;
+ }
void AddAge(int64_t ms);
};