vtkXRenderWindowInteractor destroys application context even if it was created externally.
This issue was created automatically from an original Mantis Issue. Further discussion may take place here.
vtkXRenderWindowInteractor allows initialization with externally provided application context. If that is the case, vtkXRenderWindowInteractor is not supposed to destroy the application context when the last instance is destroyed. Prior to CVS version 1.114 of vtkXRenderWindowInteractor.cxx the destructor used to verify OwnApp member to make sure that the application context is owned by VTK before destorying it. In later versions OwnApp is initialized correctly but is ignored in the destructor. To fix it line 87 (version 1.119) should be changed into
if ( this->OwnApp ) { XtDestroyApplicationContext(vtkXRenderWindowInteractor::App); }