From fffbd86a1014ad169ed2d68ea58cdddf346faa14 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 21 Jul 2015 00:47:44 +0300 Subject: Add missing checks and non null attributes. --- src/utils/copynpaste.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'src/utils/copynpaste.cpp') 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) -- cgit v1.2.3-70-g09d2