[win32] integrate mainline
[p5sagit/p5-mst-13.2.git] / pp_hot.c
index be1ce49..2fba24a 100644 (file)
--- a/pp_hot.c
+++ b/pp_hot.c
@@ -1997,8 +1997,9 @@ PP(pp_entersub)
         * (3) instead of (2) so we'd have to clone. Would the fact
         * that we released the mutex more quickly make up for this?
         */
-       svp = hv_fetch(thr->cvcache, (char *)cv, sizeof(cv), FALSE);
-       if (svp) {
+       if (threadnum &&
+           (svp = hv_fetch(thr->cvcache, (char *)cv, sizeof(cv), FALSE)))
+       {
            /* We already have a clone to use */
            MUTEX_UNLOCK(CvMUTEXP(cv));
            cv = *(CV**)svp;