Browse Source

bugfix when hot reload disabled

Nicolas Cannasse 5 years ago
parent
commit
7ff7614530
1 changed files with 1 additions and 1 deletions
  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 ) {
 	hl_free(&m->ctx.alloc);
 	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_ptrs);
 	free(m->ctx.functions_types);