Fixes a race that's either really hard to hit if you're a developer
or really easy to hit if you're a user.
Thanks to ApB for the debug assistance.
Fix T5484
output->next.fb = fb;
return 0;
}
- if (!fb) fb = output->next.fb;
+ if (!fb)
+ {
+ fb = output->next.fb;
+ output->next.fb = NULL;
+ }
/* So we can generate a tick by flipping to the current fb */
if (!fb) fb = output->current.fb;
- if (output->next.fb && fb != output->next.fb)
+ if (output->next.fb)
_release_buffer(output, &output->next);
/* If we don't have an fb to set by now, BAIL! */