aboutsummaryrefslogtreecommitdiff
path: root/render/drm_format_set.c
diff options
context:
space:
mode:
authorAnthony Super <anthony@noided.media>2021-10-17 15:38:53 -0600
committerSimon Ser <contact@emersion.fr>2021-10-18 14:36:04 +0200
commite22a38631924d5a5678c11c86ec0b6c5a84fb0e5 (patch)
tree7610b3640f911d2ffe6c69c77b560db947d9e60d /render/drm_format_set.c
parent8e346922508aa3eaccd6e12f2917f6574f349843 (diff)
Add error handling to backend creation
This commit adds two error-handling cases to the function attempt_dmr_backend. Specifically: - In the case where the number of found GPUs is zero, we now print a log message indicating this and return a NULL pointer - In the case where we could not successfully create a backend on any GPU, we now log a message indicating this and return a NULL pointer This allows us to provide more descriptive error messages, as well as avoid a SEGFAULT (the function `ensure_primary_backend_renderer_and_allocator` dereferences the pointer given, which could be NULL until this patch) when these cases arise.
Diffstat (limited to 'render/drm_format_set.c')
0 files changed, 0 insertions, 0 deletions