Skip to content

Commit

Permalink
common: Avoid crash if zrtp has not finished
Browse files Browse the repository at this point in the history
  • Loading branch information
jrsnen committed Aug 26, 2024
1 parent 8019b4d commit a09196f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/media_stream.cc
Original file line number Diff line number Diff line change
Expand Up @@ -754,6 +754,12 @@ rtp_error_t uvgrtp::media_stream::check_push_preconditions(int rtp_flags, bool s
return RTP_GENERIC_ERROR;
}

if (media_ == nullptr)
{
UVG_LOG_ERROR("Media not intialized");
return RTP_GENERIC_ERROR;
}

if (smart_pointer && (rtp_flags & RTP_COPY))
{
UVG_LOG_ERROR("Copying a smart pointer does not make sense since the original would be lost");
Expand Down

0 comments on commit a09196f

Please sign in to comment.