[Scummvm-git-logs] scummvm master -> 1445230bc938cda3eaad6a62d18a60f876985c7c
rvanlaar
noreply at scummvm.org
Mon Sep 12 19:58:03 UTC 2022
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
1445230bc9 DIRECTOR: LINGO: XOBJ: fix uninitialized variable
Commit: 1445230bc938cda3eaad6a62d18a60f876985c7c
https://github.com/scummvm/scummvm/commit/1445230bc938cda3eaad6a62d18a60f876985c7c
Author: Roland van Laar (roland at rolandvanlaar.nl)
Date: 2022-09-12T21:54:51+02:00
Commit Message:
DIRECTOR: LINGO: XOBJ: fix uninitialized variable
Changed paths:
engines/director/lingo/xlibs/xplayanim.cpp
diff --git a/engines/director/lingo/xlibs/xplayanim.cpp b/engines/director/lingo/xlibs/xplayanim.cpp
index 1521641bc10..f656a80668c 100644
--- a/engines/director/lingo/xlibs/xplayanim.cpp
+++ b/engines/director/lingo/xlibs/xplayanim.cpp
@@ -67,7 +67,7 @@ void XPlayAnim::b_xplayanim(int nargs) {
}
memcpy(origPalette, g_director->getPalette(), origCount * 3);
- Graphics::Surface const *frame;
+ Graphics::Surface const *frame = nullptr;
Common::Event event;
bool keepPlaying = true;
video->start();
@@ -101,10 +101,11 @@ void XPlayAnim::b_xplayanim(int nargs) {
g_system->delayMillis(10);
}
- // Display the last frame after the video is done
- g_director->getCurrentWindow()->getSurface()->copyRectToSurface(
- frame->getPixels(), frame->pitch, x, y, frame->w, frame->h
- );
+ if (frame != nullptr)
+ // Display the last frame after the video is done
+ g_director->getCurrentWindow()->getSurface()->copyRectToSurface(
+ frame->getPixels(), frame->pitch, x, y, frame->w, frame->h
+ );
video->close();
delete video;
More information about the Scummvm-git-logs
mailing list