diff options
author | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2015-11-26 11:32:27 +0200 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2015-11-26 11:32:27 +0200 |
commit | f0092bc3f815a5577c2fd38be55a406f2d4683fc (patch) | |
tree | 6895df8d19ec19d6d1a3771c9f51f0e77ae2ce10 /libkms++ | |
parent | 267b3506e8a6e9024c0f4b0659656dcd381980c0 (diff) |
DumbFB: don't unmap if not mapped
Diffstat (limited to 'libkms++')
-rw-r--r-- | libkms++/dumbframebuffer.cpp | 3 |
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(); |