Skip to content

Commit

Permalink
Fixed TManagedPointer & TKernel null reference
Browse files Browse the repository at this point in the history
  • Loading branch information
AdventureT committed Dec 8, 2023
1 parent f79cf6b commit d7d2af4
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Toshi/Include/TKernel/TManagedPointer.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ template<class T>
class TOSHI_EXPORT TManagedPointer
{
public:
TManagedPointer() : m_pObject(new T())
TManagedPointer() : m_pObject(TNULL)
{

}
Expand Down
2 changes: 1 addition & 1 deletion Toshi/Include/TKernel/TScheduler.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class TOSHI_EXPORT TScheduler : public TObject
DECLARE_DYNAMIC(TScheduler);
public:

TScheduler();
TScheduler(TKernelInterface* a_pKernel);

TTask* CreateTask(TClass const& a_rTaskClass, TTask* a_pTask);
void Update();
Expand Down
2 changes: 1 addition & 1 deletion Toshi/Source/TKernel/TKernelInterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ TKernelInterface::TKernelInterface(TINT argc, TPCHAR* const argv, TBOOL a_bVerbo
pAbsSystem->SetPrefix("");
pFileManager->SetSystemPath("local");

m_pScheduler = new TScheduler();
m_pScheduler = new TScheduler(this);
}

TBOOL TKernelInterface::Update()
Expand Down
4 changes: 2 additions & 2 deletions Toshi/Source/TKernel/TScheduler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ TBOOL Profiler_Control_ParentStart = TFALSE;
TBOOL Profiler_Control_ParentStop = TFALSE;
TProfiler Profiler_Program;

TScheduler::TScheduler()
TScheduler::TScheduler(TKernelInterface* a_pKernel)
{
m_pCurrentTask = TNULL;
m_pKernel = TNULL;
m_pKernel = a_pKernel;
m_fCurrentTimeDelta = 0.0f;
m_fTotalTime = 0.0f;
m_fDebugSlowTime = 1.0f;
Expand Down

0 comments on commit d7d2af4

Please sign in to comment.