Fix potential divide-by-zero with wxGTK when opening video.
Originally committed to SVN as r4741.
This commit is contained in:
parent
9c93198c3b
commit
b9f9b0a80a
1 changed files with 1 additions and 1 deletions
|
@ -273,7 +273,7 @@ void VideoDisplay::Render() try {
|
||||||
VideoContext *context = VideoContext::Get();
|
VideoContext *context = VideoContext::Get();
|
||||||
if (!context->IsLoaded()) return;
|
if (!context->IsLoaded()) return;
|
||||||
assert(wxIsMainThread());
|
assert(wxIsMainThread());
|
||||||
assert(w > 0);
|
if (!viewport_height || !viewport_width) UpdateSize();
|
||||||
|
|
||||||
videoOut->Render(viewport_x, viewport_bottom, viewport_width, viewport_height);
|
videoOut->Render(viewport_x, viewport_bottom, viewport_width, viewport_height);
|
||||||
E(glViewport(0, std::min(viewport_bottom, 0), w, h));
|
E(glViewport(0, std::min(viewport_bottom, 0), w, h));
|
||||||
|
|
Loading…
Reference in a new issue