summaryrefslogtreecommitdiff
path: root/src/utils/copynpaste.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-07-21 00:47:44 +0300
committerAndrei Karas <akaras@inbox.ru>2015-07-21 00:47:44 +0300
commitfffbd86a1014ad169ed2d68ea58cdddf346faa14 (patch)
tree713c96fcf7421ca87f638d312e752179281cb8fe /src/utils/copynpaste.cpp
parent1941b81a5a278f26a5d7e1f91903ab04c92e2cd1 (diff)
downloadmanaverse-fffbd86a1014ad169ed2d68ea58cdddf346faa14.tar.gz
manaverse-fffbd86a1014ad169ed2d68ea58cdddf346faa14.tar.bz2
manaverse-fffbd86a1014ad169ed2d68ea58cdddf346faa14.tar.xz
manaverse-fffbd86a1014ad169ed2d68ea58cdddf346faa14.zip
Add missing checks and non null attributes.
Diffstat (limited to 'src/utils/copynpaste.cpp')
-rw-r--r--src/utils/copynpaste.cpp6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/utils/copynpaste.cpp b/src/utils/copynpaste.cpp
index ce16bbab0..1f88d8abf 100644
--- a/src/utils/copynpaste.cpp
+++ b/src/utils/copynpaste.cpp
@@ -373,13 +373,9 @@ bool retrieveBuffer(std::string& text, size_t& pos)
{
Display *const dpy = info.info.x11.display;
Window us = info.info.x11.window;
- char *data = nullptr;
requestAtom = XInternAtom(dpy, "UTF8_STRING", true);
-
- if (!data)
- data = getSelection(dpy, us, XA_PRIMARY);
-
+ char *data = getSelection(dpy, us, XA_PRIMARY);
if (!data)
data = getSelection(dpy, us, XA_SECONDARY);
if (!data)