mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-31 16:03:24 +00:00
CE workaround - skipping the movie is better than crashing if the LUT cannot be allocated
svn-id: r16218
This commit is contained in:
parent
4e497117bd
commit
c741d06504
@ -321,6 +321,10 @@ void BaseAnimationState::buildLookup() {
|
||||
return;
|
||||
|
||||
lookup = (OverlayColor *)calloc((BITDEPTH+1) * (BITDEPTH+1) * 256, sizeof(OverlayColor));
|
||||
if (!lookup) {
|
||||
warning("Not enough memory to allocate LUT - cannot play sequence");
|
||||
return;
|
||||
}
|
||||
|
||||
int y, cb, cr;
|
||||
int r, g, b;
|
||||
@ -348,6 +352,9 @@ void BaseAnimationState::buildLookup() {
|
||||
|
||||
void BaseAnimationState::plotYUV(OverlayColor *lut, int width, int height, byte *const *dat) {
|
||||
|
||||
if (!lut)
|
||||
return;
|
||||
|
||||
OverlayColor *ptr = overlay + (MOVIE_HEIGHT - height) / 2 * MOVIE_WIDTH + (MOVIE_WIDTH - width) / 2;
|
||||
|
||||
int x, y;
|
||||
|
Loading…
x
Reference in New Issue
Block a user