Skip to content

Commit

Permalink
3689122
Browse files Browse the repository at this point in the history
  • Loading branch information
Tamir91 committed Dec 3, 2023
1 parent 23c4fba commit 9e0f0f8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/software-sensor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,10 @@ frame_interface * software_sensor::allocate_new_video_frame( video_stream_profil
if( frame )
{
auto vid_frame = dynamic_cast< video_frame * >( frame );

if (!vid_frame)
throw std::runtime_error("Frame is not video frame");

vid_frame->assign( profile->get_width(), profile->get_height(), stride, bpp * 8 );
auto sd = dynamic_cast< software_device * >( _owner );
sd->register_extrinsic( *profile );
Expand Down

0 comments on commit 9e0f0f8

Please sign in to comment.