mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-01-24 10:02:08 -05:00
Fix pressing text with empty chat input crashing. (Thanks nyxzimus)
This commit is contained in:
parent
316ce10567
commit
b8c5895665
2 changed files with 3 additions and 1 deletions
|
@ -110,6 +110,7 @@ namespace ClassicalSharp {
|
|||
chatInputText.Clear();
|
||||
if( typingLogPos >= game.Chat.InputLog.Count ) {
|
||||
typingLogPos = game.Chat.InputLog.Count;
|
||||
if( originalText != null )
|
||||
chatInputText.Append( 0, originalText );
|
||||
} else {
|
||||
chatInputText.Append( 0, game.Chat.InputLog[typingLogPos] );
|
||||
|
|
|
@ -195,6 +195,7 @@ namespace ClassicalSharp {
|
|||
caretPos = -1;
|
||||
Dispose();
|
||||
Height = defaultHeight;
|
||||
originalText = null;
|
||||
altText.SetActive( false );
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue