- status = notification_thread_command_remove_channel(
- notification_thread_handle,
- channel->fd, LTTNG_DOMAIN_KERNEL);
- assert(status == LTTNG_OK);
+ if (notification_thread_handle) {
+ status = notification_thread_command_remove_channel(
+ notification_thread_handle,
+ channel->fd, LTTNG_DOMAIN_KERNEL);
+ assert(status == LTTNG_OK);
+ }