Skip to content

Commit

Permalink
Add nullptr check
Browse files Browse the repository at this point in the history
  • Loading branch information
osagie98 committed Sep 20, 2024
1 parent 82b5320 commit c87c6d9
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions starboard/shared/win32/video_decoder.cc
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ scoped_ptr<MediaTransform> CreateVideoTransform(
const GUID& output_guid,
const IMFDXGIDeviceManager* device_manager,
std::string* error_message) {
SB_DCHECK(error_message);
scoped_ptr<MediaTransform> media_transform(new MediaTransform(decoder_guid));
if (!media_transform->HasValidTransform()) {
// Decoder Transform setup failed
Expand Down Expand Up @@ -431,6 +432,7 @@ SbDecodeTarget VideoDecoder::CreateDecodeTarget() {
}

void VideoDecoder::InitializeCodec(std::string* error_message) {
SB_DCHECK(error_message);
scoped_ptr<MediaTransform> media_transform;

// If this is updated then media_is_video_supported.cc also needs to be
Expand Down

0 comments on commit c87c6d9

Please sign in to comment.