You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by gn...@apache.org on 2020/02/10 14:31:44 UTC

[incubator-nuttx] 01/04: arch/sim: Fix X11 segmentation fault when CONFIG_SIM_X11NOSHM isn't enabled

This is an automated email from the ASF dual-hosted git repository.

gnutt pushed a commit to branch pr241
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit 8a571440b7355b5f1c329522c833e139f7b10a1e
Author: Xiang Xiao <xi...@xiaomi.com>
AuthorDate: Mon Feb 10 18:01:31 2020 +0800

    arch/sim: Fix X11 segmentation fault when CONFIG_SIM_X11NOSHM isn't enabled
    
    up_x11mapsharedmem should assign the share memory to g_framebuffer
    
    Change-Id: I36c610dbfc854cd362b98b213ee38585af4d6b3f
    Signed-off-by: Xiang Xiao <xi...@xiaomi.com>
---
 arch/sim/src/sim/up_x11framebuffer.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/sim/src/sim/up_x11framebuffer.c b/arch/sim/src/sim/up_x11framebuffer.c
index 94cd922..7065a94 100644
--- a/arch/sim/src/sim/up_x11framebuffer.c
+++ b/arch/sim/src/sim/up_x11framebuffer.c
@@ -317,8 +317,8 @@ static inline int up_x11mapsharedmem(int depth, unsigned int fblen)
           goto shmerror;
         }
 
+      g_framebuffer = (unsigned char *)g_image->data;
       g_shmcheckpoint++;
-
     }
   else
 #endif