Fix a Myst regression: not a good idea to use memset on a Common::String :)

svn-id: r49215
This commit is contained in:
Matthew Hoops 2010-05-25 18:11:14 +00:00
parent 849cfe4f0e
commit 5f3952e578

View File

@ -121,7 +121,9 @@ void VideoManager::waitUntilMovieEnds(VideoHandle videoHandle) {
}
delete _videoStreams[videoHandle].video;
memset(&_videoStreams[videoHandle], 0, sizeof(VideoEntry));
_videoStreams[videoHandle].video = 0;
_videoStreams[videoHandle].id = 0;
_videoStreams[videoHandle].filename = "";
}
void VideoManager::playBackgroundMovie(Common::String filename, int16 x, int16 y, bool loop) {
@ -152,8 +154,9 @@ bool VideoManager::updateBackgroundMovies() {
_videoStreams[i]->rewind();
} else {
delete _videoStreams[i].video;
memset(&_videoStreams[i], 0, sizeof(VideoEntry));
_videoStreams[i].video = NULL;
_videoStreams[i].video = 0;
_videoStreams[i].id = 0;
_videoStreams[i].filename = "";
continue;
}
}