Don't try to create an OpenGL context until video is loaded

Creating it during startup triggers a few valgrind errors in vbox's gl
driver that may or may not matter.

Originally committed to SVN as r6334.
This commit is contained in:
Thomas Goyne 2012-01-22 05:59:43 +00:00
parent 6c879c12f1
commit e10055cb59

View file

@ -190,7 +190,7 @@ void VideoDisplay::OnVideoOpen() {
}
void VideoDisplay::Render() try {
if (!InitContext() || !con->videoController->IsLoaded() || !videoOut)
if (!con->videoController->IsLoaded() || !videoOut || !InitContext() )
return;
if (!viewport_height || !viewport_width)