Skip to content

Commit 9f35e71

Browse files
authored
Merge pull request #11446 from maciejbocianski/UserAllocatedEvent_update
add missing asserts to UserAllocatedEvent class
2 parents 13c1274 + f5f1744 commit 9f35e71

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

events/UserAllocatedEvent.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,7 @@ class UserAllocatedEvent<F, void(ArgTs...)> {
214214
*/
215215
void delay(int delay)
216216
{
217+
MBED_ASSERT(!_post_ref);
217218
equeue_event_delay(&_e + 1, delay);
218219
}
219220

@@ -223,6 +224,7 @@ class UserAllocatedEvent<F, void(ArgTs...)> {
223224
*/
224225
void period(int period)
225226
{
227+
MBED_ASSERT(!_post_ref);
226228
equeue_event_period(&_e + 1, period);
227229
}
228230

0 commit comments

Comments
 (0)