[polari/wip/kunaljain/image-paste-service: 2/4] entryArea: Check if pasted text is not null



commit c6117536d1fea91152ad1d297e42ed8cf71c716c
Author: Kunaal Jain <kunaalus gmail com>
Date:   Thu Jan 7 23:24:05 2016 +0530

    entryArea: Check if pasted text is not null

 src/entryArea.js |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
---
diff --git a/src/entryArea.js b/src/entryArea.js
index 95892d1..48590fe 100644
--- a/src/entryArea.js
+++ b/src/entryArea.js
@@ -35,6 +35,7 @@ const ChatEntry = new Lang.Class({
         let clipboard = Gtk.Clipboard.get_default(this.get_display());
         clipboard.request_text(Lang.bind(this,
             function(clipboard, text) {
+                if(text==null) return;
                 let nLines = text.split('\n').length;
                 if (nLines >= MAX_LINES) {
                     this.emit('text-pasted', text, nLines);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]