heisenbug
[vg.git] / src / vg / vg_loader.h
index 23d35b9a455fec7a4806c29e7ca043ffb3fc74a7..72e4c3cad37fe8fb24309669df887197fb8ae0bd 100644 (file)
@@ -116,6 +116,7 @@ VG_STATIC float hue_to_rgb( float p, float q, float t )
 VG_STATIC void vg_render_log(void)
 {
    ui_begin( vg.window_x, vg.window_y );
+   vg_mutex_lock( &log_print_mutex );
 
    int const fh = 14;
    int lines_screen_max = ((vg.window_y/fh)-2),
@@ -140,6 +141,8 @@ VG_STATIC void vg_render_log(void)
       vg_uictx.cursor[1] -= fh;
    }
 
+   vg_mutex_unlock( &log_print_mutex );
+
    ui_resolve();
    ui_draw( NULL );
 }