mirror of
https://github.com/mpv-player/mpv
synced 2024-12-28 01:52:19 +00:00
vo_opengl: don't assume there'a always 1 fbconfig on success
Seems to be a reasonable assumption, but it's probably not guaranteed.
This commit is contained in:
parent
369e88c99b
commit
302e8ff464
@ -157,7 +157,7 @@ static GLXFBConfig select_fb_config(struct vo *vo, const int *attribs, int flags
|
||||
return NULL;
|
||||
|
||||
// The list in fbc is sorted (so that the first element is the best).
|
||||
GLXFBConfig fbconfig = fbc[0];
|
||||
GLXFBConfig fbconfig = fbcount > 0 ? fbc[0] : NULL;
|
||||
|
||||
if (flags & VOFLAG_ALPHA) {
|
||||
for (int n = 0; n < fbcount; n++) {
|
||||
|
Loading…
Reference in New Issue
Block a user