diff --git a/dom/media/BaseMediaResource.cpp b/dom/media/BaseMediaResource.cpp index 1dcf2d7080ac..4a36d7c20de1 100644 --- a/dom/media/BaseMediaResource.cpp +++ b/dom/media/BaseMediaResource.cpp @@ -114,7 +114,7 @@ void BaseMediaResource::SetLoadInBackground(bool aLoadInBackground) { NS_WARNING("Null owner in MediaResource::SetLoadInBackground()"); return; } - dom::HTMLMediaElement* element = owner->GetMediaElement(); + RefPtr element = owner->GetMediaElement(); if (!element) { NS_WARNING("Null element in MediaResource::SetLoadInBackground()"); return;