aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2015-08-10 20:58:35 +0200
committerMattias Andrée <maandree@operamail.com>2015-08-10 20:58:35 +0200
commit6afb287abb25e9caf1a4aba7c7a7ce07b2264b5d (patch)
tree8414924ae71a8d9db831f3e8ca17fe3fcd5be365 /src
parentadd /dev/console as an alternative for drm (diff)
downloadlibgamma-6afb287abb25e9caf1a4aba7c7a7ce07b2264b5d.tar.gz
libgamma-6afb287abb25e9caf1a4aba7c7a7ce07b2264b5d.tar.bz2
libgamma-6afb287abb25e9caf1a4aba7c7a7ce07b2264b5d.tar.xz
m + remove abort if connector is not found, that can actually happen
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to 'src')
-rw-r--r--src/lib/gamma-linux-drm.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/lib/gamma-linux-drm.c b/src/lib/gamma-linux-drm.c
index b785c9f..b0d3a01 100644
--- a/src/lib/gamma-linux-drm.c
+++ b/src/lib/gamma-linux-drm.c
@@ -498,7 +498,7 @@ static drmModeConnector* find_connector(libgamma_crtc_state_t* restrict this, in
*error = 0;
/* Find connector. */
for (i = 0; i < n; i++)
- if ((card->encoders[i] != NULL) && (card->encoders[i]->crtc_id == crtc_id))
+ if ((card->encoders[i] != NULL) && (card->connectors[i] != NULL) && (card->encoders[i]->crtc_id == crtc_id))
return card->connectors[i];
/* We did not find the connector. */
*error = LIBGAMMA_CONNECTOR_UNKNOWN;
@@ -788,8 +788,6 @@ int libgamma_linux_drm_get_crtc_information(libgamma_crtc_information_t* restric
/* Find connector. */
if ((connector = find_connector(crtc, &error)) == NULL)
{
- perror("connector not found");
- abort();
/* Store reported error in affected fields. */
e |= this->width_mm_error = this->height_mm_error
= this->connector_type_error = this->subpixel_order_error