소스 검색

CoreTiming: Initialize static variables at bootup.

bunnei 11 년 전
부모
커밋
5a855bdb2f
1개의 변경된 파일10개의 추가작업 그리고 0개의 파일을 삭제
  1. 10 0
      src/core/core_timing.cpp

+ 10 - 0
src/core/core_timing.cpp

@@ -160,6 +160,16 @@ void Init() {
     last_global_time_us = 0;
     has_ts_events = 0;
     mhz_change_callbacks.clear();
+
+    first = nullptr;
+    ts_first = nullptr;
+    ts_last = nullptr;
+
+    event_pool = nullptr;
+    event_ts_pool = nullptr;
+    allocated_ts_events = 0;
+
+    advance_callback = nullptr;
 }
 
 void Shutdown() {