Without this commit, the client will segmentation fault due to accessing the frame after everything has been destroyed.