emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/src/w16select.c,v


From: Eli Zaretskii
Subject: [Emacs-diffs] Changes to emacs/src/w16select.c,v
Date: Sat, 30 Aug 2008 12:32:17 +0000

CVSROOT:        /cvsroot/emacs
Module name:    emacs
Changes by:     Eli Zaretskii <eliz>    08/08/30 12:32:16

Index: w16select.c
===================================================================
RCS file: /cvsroot/emacs/emacs/src/w16select.c,v
retrieving revision 1.44
retrieving revision 1.45
diff -u -b -r1.44 -r1.45
--- w16select.c 23 Aug 2008 16:49:32 -0000      1.44
+++ w16select.c 30 Aug 2008 12:32:16 -0000      1.45
@@ -500,6 +500,9 @@
 
   BLOCK_INPUT;
 
+  if (!open_clipboard ())
+    goto error;
+
   nbytes = SBYTES (string);
   src = SDATA (string);
 
@@ -515,6 +518,7 @@
         will have to convert it to DOS CR-LF style.  */
       no_crlf_conversion = 0;
       Vlast_coding_system_used = Qraw_text;
+      dst = NULL;      /* so we don't try to free a random pointer */
     }
   else
     {
@@ -541,9 +545,6 @@
       src = dst;
     }
 
-  if (!open_clipboard ())
-    goto error;
-
   ok = empty_clipboard ()
     && ((put_status
         = set_clipboard_data (CF_OEMTEXT, src, nbytes, no_crlf_conversion))
@@ -595,7 +596,7 @@
      Lisp_Object frame;
 {
   unsigned data_size, truelen;
-  unsigned char *htext;
+  unsigned char *htext = NULL;
   Lisp_Object ret = Qnil;
   int no_crlf_conversion, require_decoding = 0;
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]