Skip to content

Commit

Permalink
safe ptr or something idk
Browse files Browse the repository at this point in the history
  • Loading branch information
dd01da0465b4542f8f8af4ecedc149ed committed Mar 6, 2021
1 parent de6adfa commit f73c4ae
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion include/colorizer/ObstacleColorizer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ namespace Chroma {
GlobalNamespace::ObstacleController* _oc;
UnityEngine::Color _color_Original;
// TODO: THIS MAY GET GC'ED. WE MAY NEED CUSTOM TYPES
GlobalNamespace::SimpleColorSO* _color;
SafePtr<GlobalNamespace::SimpleColorSO> _color;
GlobalNamespace::StretchableObstacle* _stretchableObstacle;
explicit OCColorManager(GlobalNamespace::ObstacleController* oc);

Expand Down
2 changes: 1 addition & 1 deletion src/colorizer/ObstacleColorizer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ ObstacleColorizer::OCColorManager::OCColorManager(GlobalNamespace::ObstacleContr
if (_color == nullptr)
{
// TODO: We might need custom type here
_color = ScriptableObject::CreateInstance<SimpleColorSO*>();
_color = SafePtr(ScriptableObject::CreateInstance<SimpleColorSO*>());
_color->SetColor(_color_Original);
}

Expand Down

0 comments on commit f73c4ae

Please sign in to comment.