Fix potential divide-by-zero with wxGTK when opening video.

Originally committed to SVN as r4741.
This commit is contained in:
Thomas Goyne 2010-08-13 05:51:31 +00:00
parent 9c93198c3b
commit b9f9b0a80a

View file

@ -273,7 +273,7 @@ void VideoDisplay::Render() try {
VideoContext *context = VideoContext::Get();
if (!context->IsLoaded()) return;
assert(wxIsMainThread());
assert(w > 0);
if (!viewport_height || !viewport_width) UpdateSize();
videoOut->Render(viewport_x, viewport_bottom, viewport_width, viewport_height);
E(glViewport(0, std::min(viewport_bottom, 0), w, h));