summaryrefslogtreecommitdiff
path: root/libkms++
diff options
context:
space:
mode:
Diffstat (limited to 'libkms++')
-rw-r--r--libkms++/encoder.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/libkms++/encoder.cpp b/libkms++/encoder.cpp
index 081177b..81eba71 100644
--- a/libkms++/encoder.cpp
+++ b/libkms++/encoder.cpp
@@ -42,7 +42,10 @@ void Encoder::print_short() const
Crtc* Encoder::get_crtc() const
{
- return card().get_crtc(m_priv->drm_encoder->crtc_id);
+ if (m_priv->drm_encoder->crtc_id)
+ return card().get_crtc(m_priv->drm_encoder->crtc_id);
+ else
+ return 0;
}
vector<Crtc*> Encoder::get_possible_crtcs() const