Fix #160299: crash when unlinking a sound file in the VSE

Regression from b2535d04f8 which missed
the possibility that the sound could be null, so simply add a null
pointer check to prevent the crash.

Pull Request: https://projects.blender.org/blender/blender/pulls/160305
This commit is contained in:
Kévin Dietrich 2026-06-18 14:09:09 +02:00 • committed by Kévin Dietrich
parent 11e0336ed2
commit a751fdb073

View file

@ -110,7 +110,7 @@ bool media_presence_is_missing(Scene *scene, const Strip *strip)
* block. Since it can be used by multiple strips. */
if (strip->type == STRIP_TYPE_SOUND) {
const bSound *sound = strip->sound;
if (sound->packedfile != nullptr) {
if (sound && sound->packedfile != nullptr) {
/* The sound file has been packed, don't look up the path. */
return false;
}