diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/xselect.c | 10 |
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, | |||
| 2369 | { | 2369 | { |
| 2370 | Window window; | 2370 | Window window; |
| 2371 | Atom buffer_atom; | 2371 | Atom buffer_atom; |
| 2372 | unsigned char *data; | 2372 | unsigned char *data = NULL; |
| 2373 | int bytes; | 2373 | int bytes; |
| 2374 | Atom type; | 2374 | Atom type; |
| 2375 | int format; | 2375 | int format; |
| @@ -2393,12 +2393,10 @@ DEFUN ("x-get-cut-buffer-internal", Fx_get_cut_buffer_internal, | |||
| 2393 | x_get_window_property (display, window, buffer_atom, &data, &bytes, | 2393 | x_get_window_property (display, window, buffer_atom, &data, &bytes, |
| 2394 | &type, &format, &size, 0); | 2394 | &type, &format, &size, 0); |
| 2395 | 2395 | ||
| 2396 | if (!data) | 2396 | if (!data || !format) |
| 2397 | return Qnil; | ||
| 2398 | |||
| 2399 | if (!format) | ||
| 2400 | { | 2397 | { |
| 2401 | xfree (data); | 2398 | if (data) |
| 2399 | xfree (data); | ||
| 2402 | return Qnil; | 2400 | return Qnil; |
| 2403 | } | 2401 | } |
| 2404 | 2402 | ||