Skip to content

Commit

Permalink
display/drm: Fix potential nullptr dereference
Browse files Browse the repository at this point in the history
Fixes CID 460884
  • Loading branch information
mpiatka committed May 21, 2024
1 parent 561f2fa commit 08b23e7
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/video_display/drm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -491,6 +491,7 @@ static bool probe_drm_formats(drm_display_state *s){
Drm_object_properties_uniq props(drmModeObjectGetProperties(dri, plane_res->planes[i], DRM_MODE_OBJECT_PLANE));
if(!props){
log_msg(LOG_LEVEL_ERROR, MOD_NAME "Failed to get plane props (%s)\n", strerror(errno));
continue;
}
if(get_property(dri, props.get(), "type") == DRM_PLANE_TYPE_PRIMARY){
primary_plane = std::move(plane);
Expand Down

0 comments on commit 08b23e7

Please sign in to comment.