summaryrefslogtreecommitdiff
path: root/libkms++
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@ti.com>2015-11-26 11:32:27 +0200
committerTomi Valkeinen <tomi.valkeinen@ti.com>2015-11-26 11:32:27 +0200
commitf0092bc3f815a5577c2fd38be55a406f2d4683fc (patch)
tree6895df8d19ec19d6d1a3771c9f51f0e77ae2ce10 /libkms++
parent267b3506e8a6e9024c0f4b0659656dcd381980c0 (diff)
DumbFB: don't unmap if not mapped
Diffstat (limited to 'libkms++')
-rw-r--r--libkms++/dumbframebuffer.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/libkms++/dumbframebuffer.cpp b/libkms++/dumbframebuffer.cpp
index ec0fefb..cc97dde 100644
--- a/libkms++/dumbframebuffer.cpp
+++ b/libkms++/dumbframebuffer.cpp
@@ -117,7 +117,8 @@ void DumbFramebuffer::Destroy()
FramebufferPlane& plane = m_planes[i];
/* unmap buffer */
- munmap(plane.map, plane.size);
+ if (plane.map)
+ munmap(plane.map, plane.size);
/* delete dumb buffer */
struct drm_mode_destroy_dumb dreq = drm_mode_destroy_dumb();