Third party program crashes when TeamViewer 12 session is ended

Hi,

I am a developer  of a third party program that crashes when a TeamViewer session ends on that Windows 10 computer.  I don't know where to begin looking.  Any insight on what TeamViewer is doing in the background when it ends a session would be appreciated.

Thanks,

Mike