subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1497399 - /subversion/trunk/subversion/libsvn_client/cleanup.c
Date Thu, 27 Jun 2013 15:32:51 GMT
Author: stsp
Date: Thu Jun 27 15:32:51 2013
New Revision: 1497399

URL: http://svn.apache.org/r1497399
Log:
* subversion/libsvn_client/cleanup.c
  (cleanup_status_walk): Check ctx->notify_func2 for NULL before calling it.

Suggested by: danielsh

Modified:
    subversion/trunk/subversion/libsvn_client/cleanup.c

Modified: subversion/trunk/subversion/libsvn_client/cleanup.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/cleanup.c?rev=1497399&r1=1497398&r2=1497399&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/cleanup.c (original)
+++ subversion/trunk/subversion/libsvn_client/cleanup.c Thu Jun 27 15:32:51 2013
@@ -153,10 +153,14 @@ cleanup_status_walk(void *baton,
       SVN_ERR(svn_io_check_path(local_abspath, &kind_on_disk, scratch_pool));
       if (kind_on_disk == svn_node_dir)
         {
-          notify = svn_wc_create_notify(local_abspath,
-                                        svn_wc_notify_cleanup_external,
-                                        scratch_pool);
-          (*b->ctx->notify_func2)(b->ctx->notify_baton2, notify, scratch_pool);
+          if (b->ctx->notify_func2)
+            {
+              notify = svn_wc_create_notify(local_abspath,
+                                            svn_wc_notify_cleanup_external,
+                                            scratch_pool);
+              (*b->ctx->notify_func2)(b->ctx->notify_baton2, notify,
+                                      scratch_pool);
+            }
 
           err = do_cleanup(local_abspath, b->include_externals,
                             b->remove_unversioned_items,
@@ -204,10 +208,13 @@ cleanup_status_walk(void *baton,
         return SVN_NO_ERROR;
     }
 
-  notify = svn_wc_create_notify(local_abspath, svn_wc_notify_delete,
-                                scratch_pool);
-  notify->kind = kind_on_disk;
-  (*b->ctx->notify_func2)(b->ctx->notify_baton2, notify, scratch_pool);
+  if (b->ctx->notify_func2)
+    {
+      notify = svn_wc_create_notify(local_abspath, svn_wc_notify_delete,
+                                    scratch_pool);
+      notify->kind = kind_on_disk;
+      (*b->ctx->notify_func2)(b->ctx->notify_baton2, notify, scratch_pool);
+    }
 
   return SVN_NO_ERROR;
 }



Mime
View raw message