Skip to content

Commit

Permalink
Merge pull request godotengine#100218 from akien-mga/scene-debugger-c…
Browse files Browse the repository at this point in the history
…rash-invalid-shortcut

[Debugger] Fix scene debugger crash when editor shortcuts are invalid
  • Loading branch information
Repiteo committed Dec 10, 2024
2 parents 69c67ed + a8caad3 commit 9cf645d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scene/debugger/scene_debugger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ void SceneDebugger::deinitialize() {
#ifdef DEBUG_ENABLED
void SceneDebugger::_handle_input(const Ref<InputEvent> &p_event, const Ref<Shortcut> &p_shortcut) {
Ref<InputEventKey> k = p_event;
if (k.is_valid() && k->is_pressed() && !k->is_echo() && p_shortcut->matches_event(k)) {
if (p_shortcut.is_valid() && k.is_valid() && k->is_pressed() && !k->is_echo() && p_shortcut->matches_event(k)) {
EngineDebugger::get_singleton()->send_message("request_quit", Array());
}
}
Expand Down

0 comments on commit 9cf645d

Please sign in to comment.