Skip to content

Commit

Permalink
πŸ› Fix crash when changing project from the menu
Browse files Browse the repository at this point in the history
Fixes #111 Fixes #112
  • Loading branch information
JulesFouchy committed Dec 31, 2024
1 parent 026f586 commit e60acea
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Cool
4 changes: 3 additions & 1 deletion src/ModulesGraph/ModulesGraph.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#include "Cool/Log/ToUser.h"
#include "Cool/Nodes/NodesLibrary.h"
#include "Cool/StrongTypes/Camera2D.h"
#include "Cool/TextureSource/default_textures.h"
#include "Module_Compositing/Module_Compositing.h"
#include "Module_Compositing/generate_compositing_shader_code.h"
#include "Module_Default/Module_Default.hpp"
Expand Down Expand Up @@ -365,7 +366,8 @@ void ModulesGraph::submit_gizmos(Cool::GizmoManager& gizmos, CommandExecutor con

auto ModulesGraph::final_texture() const -> Cool::TextureRef
{
assert(_root_module && "You must call render() before trying to access the final texture");
if (!_root_module)
return Cool::transparent_texture().ref();
return _root_module->texture();
}

Expand Down

0 comments on commit e60acea

Please sign in to comment.