summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorportix <portix@gmx.net>2012-11-22 17:38:20 +0100
committerportix <portix@gmx.net>2012-11-22 17:38:20 +0100
commit85659e8488445ce7a9fd2c51c00cee1f2e848ce3 (patch)
treeb9f64abeb89601ffea0bddb9786bf3ff3f255388 /src
parent58996d0b8304580ebdfec1a0c48525335dd185a2 (diff)
downloaddwb-85659e8488445ce7a9fd2c51c00cee1f2e848ce3.zip
Fixing segfault in dwb_paste_into_entry
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')