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



commit a2549adc9ee931daf0de1bed51be6c2ec0d99478
Author: Kunaal Jain <kunaalus gmail com>
Date:   Wed Feb 10 16:07:47 2016 +0530

    entryArea: Check if pasted text is not null

 src/entryArea.js |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/src/entryArea.js b/src/entryArea.js
index 416671f..a9f8612 100644
--- a/src/entryArea.js
+++ b/src/entryArea.js
@@ -35,6 +35,8 @@ 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;
                text = text.trim();
 
                 let nLines = text.split('\n').length;


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