I would have to take a longer look at what you are doing, but the variable m_sequencer contains the handle to the sequencer that the sequence is running on. You are trying to change m_sequencer to point to a different sequencer and this might be causing issues.