From f0092bc3f815a5577c2fd38be55a406f2d4683fc Mon Sep 17 00:00:00 2001 From: Tomi Valkeinen Date: Thu, 26 Nov 2015 11:32:27 +0200 Subject: DumbFB: don't unmap if not mapped --- libkms++/dumbframebuffer.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'libkms++') 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(); -- cgit v1.2.3