summaryrefslogtreecommitdiff
path: root/libkms++
diff options
context:
space:
mode:
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();