Fixed a crash when closing online capture