소스 검색

Fix null pointer deref (#166)

Sang Kil Cha 6 년 전
부모
커밋
c9d7df13fd
1개의 변경된 파일3개의 추가작업 그리고 1개의 파일을 삭제
  1. 3 1
      Terminal.Gui/Views/TextField.cs

+ 3 - 1
Terminal.Gui/Views/TextField.cs

@@ -268,8 +268,10 @@ namespace Terminal.Gui {
 				break;
 
 			case Key.ControlY: // Control-y, yank
+				if (Clipboard.Contents == null)
+					return true;
 				var clip = TextModel.ToRunes (Clipboard.Contents);
-				if (clip== null)
+				if (clip == null)
 					return true;
 
 				if (point == text.Count) {