Ver Fonte

bugfix when hot reload disabled

Nicolas Cannasse há 5 anos atrás
pai
commit
7ff7614530
1 ficheiros alterados com 1 adições e 1 exclusões
  1. 1 1
      src/module.c

+ 1 - 1
src/module.c

@@ -705,7 +705,7 @@ h_bool hl_module_patch( hl_module *m1, hl_code *c ) {
 void hl_module_free( hl_module *m ) {
 void hl_module_free( hl_module *m ) {
 	hl_free(&m->ctx.alloc);
 	hl_free(&m->ctx.alloc);
 	hl_free_executable_memory(m->code, m->codesize);
 	hl_free_executable_memory(m->code, m->codesize);
-	hl_code_hash_free(m->hash);
+	if( m->hash ) hl_code_hash_free(m->hash);
 	free(m->functions_indexes);
 	free(m->functions_indexes);
 	free(m->functions_ptrs);
 	free(m->functions_ptrs);
 	free(m->ctx.functions_types);
 	free(m->ctx.functions_types);