You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by st...@apache.org on 2015/01/21 17:42:47 UTC

svn commit: r1653590 - /subversion/branches/pin-externals/subversion/libsvn_client/copy.c

Author: stsp
Date: Wed Jan 21 16:42:47 2015
New Revision: 1653590

URL: http://svn.apache.org/r1653590
Log:
On the pin-externals branch, don't dereference a NULL pointer.
Makes regression tests much happier.

* subversion/libsvn_client/copy.c
  (repos_to_repos_copy): Only iterate over pin_externals_only_infos if not NULL.

Modified:
    subversion/branches/pin-externals/subversion/libsvn_client/copy.c

Modified: subversion/branches/pin-externals/subversion/libsvn_client/copy.c
URL: http://svn.apache.org/viewvc/subversion/branches/pin-externals/subversion/libsvn_client/copy.c?rev=1653590&r1=1653589&r2=1653590&view=diff
==============================================================================
--- subversion/branches/pin-externals/subversion/libsvn_client/copy.c (original)
+++ subversion/branches/pin-externals/subversion/libsvn_client/copy.c Wed Jan 21 16:42:47 2015
@@ -1535,13 +1535,16 @@ repos_to_repos_copy(const apr_array_head
     }
 
   /* Add any items which only need their externals pinned. */
-  for (i = 0; i < pin_externals_only_infos->nelts; i++)
+  if (pin_externals_only_infos)
     {
-      path_driver_info_t *info;
-      
-      info = APR_ARRAY_IDX(pin_externals_only_infos, i, path_driver_info_t *);
-      APR_ARRAY_PUSH(paths, const char *) = info->dst_path;
-      svn_hash_sets(action_hash, info->dst_path, info);
+      for (i = 0; i < pin_externals_only_infos->nelts; i++)
+        {
+          path_driver_info_t *info;
+          
+          info = APR_ARRAY_IDX(pin_externals_only_infos, i, path_driver_info_t *);
+          APR_ARRAY_PUSH(paths, const char *) = info->dst_path;
+          svn_hash_sets(action_hash, info->dst_path, info);
+        }
     }
 
   SVN_ERR(svn_client__ensure_revprop_table(&commit_revprops, revprop_table,