Commit cca78e06 authored by tcavallari's avatar tcavallari

Null Pointer check in vizimpl.cpp

Should fix #4191 (http://code.opencv.org/issues/4191)
parent b27467d9
......@@ -85,7 +85,7 @@ void cv::viz::Viz3d::VizImpl::TimerCallback::Execute(vtkObject* caller, unsigned
void cv::viz::Viz3d::VizImpl::ExitCallback::Execute(vtkObject*, unsigned long event_id, void*)
{
if (event_id == vtkCommand::ExitEvent)
if (event_id == vtkCommand::ExitEvent && viz->interactor_)
{
viz->interactor_->TerminateApp();
viz->interactor_ = 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment