CreateFiber() will be return NULL when it fails. If co->fiber is null,
SwitchToFiber() aborts with
C0000005 and it corrupts stack that make
hard to find causes. So it is better to abort when CreateFiber()
returns NULL.
Change-Id: Ifdc36404ce523cee842fd486bdbe071e58b7d7b3
Signed-off-by: SeokYeon Hwang <syeon.hwang@samsung.com>
co = g_malloc0(sizeof(*co));
co->fiber = CreateFiber(stack_size, coroutine_trampoline, &co->base);
+
+ g_assert(co->fiber);
+
return &co->base;
}