X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=common%2Fdiagnostics%2Fgraph.cpp;h=3c7da27c3fc7512b5291c837b75b4bd7b52b0ee5;hb=0a42b1b26e1609225029f25d7e8bf4d9ad5e133f;hp=542008e3bc33fe3420a29428f4a958ae43dc30ed;hpb=6196a1208c63eda23d35526a2002d2444b9c9179;p=casparcg diff --git a/common/diagnostics/graph.cpp b/common/diagnostics/graph.cpp index 542008e3b..3c7da27c3 100644 --- a/common/diagnostics/graph.cpp +++ b/common/diagnostics/graph.cpp @@ -140,10 +140,23 @@ private: return; } } - glClear(GL_COLOR_BUFFER_BIT); - window_->Draw(*this); - window_->Display(); - boost::this_thread::sleep(boost::posix_time::milliseconds(10)); + + try + { + glClear(GL_COLOR_BUFFER_BIT); + window_->Draw(*this); + window_->Display(); + boost::this_thread::sleep(boost::posix_time::milliseconds(10)); + } + catch (...) + { + CASPAR_LOG_CURRENT_EXCEPTION(); + CASPAR_LOG(error) + << L"Closing diag window due to error during rendering"; + window_.reset(); + return; + } + executor_.begin_invoke([this]{tick();}); }