Fix a segfault caused by animated desks and switching to area without a desk (#718)
* Fix a segfault caused by animated desks because aolayer did not make sure that movie_delays is not empty This happened because kill() did not actually reset the max_frames. Fix that too. * do the thingy longbyte said
This commit is contained in:
parent
a1edef048f
commit
8657f7c2a2
@ -383,9 +383,9 @@ void AOLayer::play()
|
||||
this->freeze();
|
||||
}
|
||||
else {
|
||||
while (movie_delays.size() <= frame) {
|
||||
frameAdded.wait(&mutex);
|
||||
}
|
||||
while (movie_delays.size() <= frame) {
|
||||
frameAdded.wait(&mutex);
|
||||
}
|
||||
ticker->start(this->get_frame_delay(movie_delays[frame]));
|
||||
}
|
||||
}
|
||||
@ -531,6 +531,8 @@ void AOLayer::kill()
|
||||
this->clear();
|
||||
movie_frames.clear();
|
||||
movie_delays.clear();
|
||||
last_max_frames = max_frames;
|
||||
max_frames = 0;
|
||||
last_path = "";
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user