[mutter] monitor-manager-kms: Fix a crash getting a crtc-less output's scale



commit 9c6e6ea3813666bb31ed4f614d93079be8b84e7e
Author: Rui Matos <tiagomatos gmail com>
Date:   Mon Mar 2 18:10:44 2015 +0100

    monitor-manager-kms: Fix a crash getting a crtc-less output's scale
    
    https://bugzilla.gnome.org/show_bug.cgi?id=745476

 src/backends/native/meta-monitor-manager-kms.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/src/backends/native/meta-monitor-manager-kms.c b/src/backends/native/meta-monitor-manager-kms.c
index 836df3b..950090f 100644
--- a/src/backends/native/meta-monitor-manager-kms.c
+++ b/src/backends/native/meta-monitor-manager-kms.c
@@ -280,6 +280,9 @@ compute_scale (MetaOutput *output)
 {
   int scale = 1;
 
+  if (!output->crtc)
+    goto out;
+
   /* Scaling makes no sense */
   if (output->crtc->rect.width < HIDPI_MIN_HEIGHT)
     goto out;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]