]> git.eshelyaron.com Git - emacs.git/commitdiff
ensure name of a mutex is a string
authorTom Tromey <tromey@redhat.com>
Sun, 19 Aug 2012 09:26:09 +0000 (03:26 -0600)
committerTom Tromey <tromey@redhat.com>
Sun, 19 Aug 2012 09:26:09 +0000 (03:26 -0600)
src/thread.c

index 83f25e8d462132ca1bb1ee358c469c3c1bdf2e91..8fa43dd57f2e6883724e9fe93ed525aa308ec862 100644 (file)
@@ -185,6 +185,9 @@ informational only.  */)
   struct Lisp_Mutex *mutex;
   Lisp_Object result;
 
+  if (!NILP (name))
+    CHECK_STRING (name);
+
   mutex = ALLOCATE_PSEUDOVECTOR (struct Lisp_Mutex, mutex, PVEC_MUTEX);
   memset ((char *) mutex + offsetof (struct Lisp_Mutex, mutex),
          0, sizeof (struct Lisp_Mutex) - offsetof (struct Lisp_Mutex,