Skip to content

Commit

Permalink
fixed editor crash when opening main_dialog.tscn
Browse files Browse the repository at this point in the history
  • Loading branch information
vorlac committed Sep 30, 2023
1 parent 350fde8 commit cd65860
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/ui/main_dialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#include "util/assert.hpp"
#include "util/constants.hpp"
#include "util/conversions.hpp"
#include "util/engine.hpp"

#include <godot_cpp/classes/canvas_layer.hpp>
#include <godot_cpp/classes/control.hpp>
Expand All @@ -12,6 +13,9 @@ namespace rl::inline ui
{
void MainDialog::_ready()
{
if (engine::editor_active())
return;

Console<godot::RichTextLabel>* game_console{ console::get() };

godot::Node* root{ scene::tree::root_node(this) };
Expand Down

0 comments on commit cd65860

Please sign in to comment.