Merge pull request #53058 from LATRio/52191

check if 'shortcut' in InputEventShortcut is valid
This commit is contained in:
Rémi Verschelde
2021-09-26 08:38:12 +02:00
committed by GitHub

View File

@@ -1557,9 +1557,13 @@ bool InputEventShortcut::is_pressed() const {
}
String InputEventShortcut::as_text() const {
ERR_FAIL_COND_V(shortcut.is_null(), "None");
return vformat(RTR("Input Event with Shortcut=%s"), shortcut->get_as_text());
}
String InputEventShortcut::to_string() {
ERR_FAIL_COND_V(shortcut.is_null(), "None");
return vformat("InputEventShortcut: shortcut=%s", shortcut->get_as_text());
}