summaryrefslogtreecommitdiff
path: root/src/xselect.c
diff options
context:
space:
mode:
authorChong Yidong <cyd@stupidchicken.com>2008-12-03 04:37:29 +0000
committerChong Yidong <cyd@stupidchicken.com>2008-12-03 04:37:29 +0000
commitede75242574141a3d120771765d28b4e11b7c305 (patch)
tree58492bb4626333965456e7f86081689994671a36 /src/xselect.c
parent7b641241989436804c583e03de6829f8446576d2 (diff)
downloademacs-ede75242574141a3d120771765d28b4e11b7c305.tar.gz
Fix last fix.
Diffstat (limited to 'src/xselect.c')
-rw-r--r--src/xselect.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/xselect.c b/src/xselect.c
index ce106f3ddac..92973100502 100644
--- a/src/xselect.c
+++ b/src/xselect.c
@@ -2369,7 +2369,7 @@ DEFUN ("x-get-cut-buffer-internal", Fx_get_cut_buffer_internal,
{
Window window;
Atom buffer_atom;
- unsigned char *data;
+ unsigned char *data = NULL;
int bytes;
Atom type;
int format;
@@ -2393,12 +2393,10 @@ DEFUN ("x-get-cut-buffer-internal", Fx_get_cut_buffer_internal,
x_get_window_property (display, window, buffer_atom, &data, &bytes,
&type, &format, &size, 0);
- if (!data)
- return Qnil;
-
- if (!format)
+ if (!data || !format)
{
- xfree (data);
+ if (data)
+ xfree (data);
return Qnil;
}