feat(Event): add assert on type when Call or Conference event are created

This commit is contained in:
Ronan Abhamon 2017-08-24 17:25:40 +02:00
parent 0e37546ef3
commit 1d968f7ddd
2 changed files with 2 additions and 0 deletions

View file

@ -36,6 +36,7 @@ public:
CallEvent::CallEvent (Type type, const shared_ptr<Call> &call) : Event(*new CallEventPrivate, type) {
L_D(CallEvent);
L_ASSERT(call);
L_ASSERT(type == CallStartEvent || type == CallEndEvent);
d->call = call;
}

View file

@ -35,6 +35,7 @@ public:
ConferenceEvent::ConferenceEvent (Type type, const shared_ptr<Address> &address) : Event(*new ConferenceEventPrivate, type) {
L_D(ConferenceEvent);
L_ASSERT(type == ConferenceCreatedEvent || type == ConferenceDestroyedEvent);
L_ASSERT(address);
d->address = address;
}