summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (from parent 1: 365091e)
raw | patch | inline | side by side (from parent 1: 365091e)
author | Tomi Valkeinen <tomi.valkeinen@ti.com> | |
Mon, 20 Jun 2016 05:46:57 +0000 (08:46 +0300) | ||
committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | |
Mon, 20 Jun 2016 05:46:57 +0000 (08:46 +0300) |
kms++/src/framebuffer.cpp | patch | blob | history |
index 1ce8f2a0070cd31a15dca65cfa6e63a54e695c23..39c4e163be287ff3cb54426cac712e287b2abbf2 100644 (file)
{
auto fb = drmModeGetFB(card.fd(), id);
{
auto fb = drmModeGetFB(card.fd(), id);
- m_width = fb->width;
- m_height = fb->height;
-
- drmModeFreeFB(fb);
+ if (fb) {
+ m_width = fb->width;
+ m_height = fb->height;
+
+ drmModeFreeFB(fb);
+ } else {
+ m_width = m_height = 0;
+ }
card.m_framebuffers.push_back(this);
}
card.m_framebuffers.push_back(this);
}