summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/dwb.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/dwb.c b/src/dwb.c
index 1f3c9464..a5ae11f9 100644
--- a/src/dwb.c
+++ b/src/dwb.c
@@ -818,6 +818,9 @@ void
dwb_paste_into_entry(GtkClipboard *clip, const char *text) {
char *buffer, *back;
+ if (text == NULL || *text == '\0')
+ return;
+
buffer = back = g_strdup(text);
while (*buffer) {
if (*buffer == '\n' || *buffer == '\r')