Fix: Crash if Movie Clip node has an empty movie

The movie clip GPU texture free function doesn't do null checks, so make
sure the movie clip is not null before freeing.
This commit is contained in:
Omar Emara 2022-08-17 15:11:35 +02:00
parent f4040da3ef
commit 923e10d751
1 changed files with 3 additions and 1 deletions

View File

@ -247,7 +247,9 @@ class MovieClipOperation : public NodeOperation {
void free_movie_clip_texture()
{
MovieClip *movie_clip = get_movie_clip();
return BKE_movieclip_free_gputexture(movie_clip);
if (movie_clip) {
BKE_movieclip_free_gputexture(movie_clip);
}
}
MovieClip *get_movie_clip()