wingo pushed a commit to branch lightning
in repository guile.

commit 1d75fe625af6020f88b7977810ed7a66c47d7bf3
Author: pcpa <[email protected]>
Date:   Tue Oct 14 17:03:51 2014 -0300

    Do not fail if NULL is passed to init_jit.
    
    This should just tell to disable the disassembler.
---
 lib/jit_disasm.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/lib/jit_disasm.c b/lib/jit_disasm.c
index 361200e..c80c9e2 100644
--- a/lib/jit_disasm.c
+++ b/lib/jit_disasm.c
@@ -59,6 +59,8 @@ static jit_state_t             *disasm_jit;
 void
 jit_init_debug(char *progname)
 {
+    if (progname == NULL)
+       return;
 #if DISASSEMBLER
     bfd_init();
 
@@ -197,7 +199,8 @@ void
 _jit_disassemble(jit_state_t *_jit)
 {
 #if DISASSEMBLER
-    disassemble(_jit->code.ptr, _jit->pc.uc - _jit->code.ptr);
+    if (disasm_bfd)
+       disassemble(_jit->code.ptr, _jit->pc.uc - _jit->code.ptr);
 #endif
 }
 

Reply via email to