File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -319,9 +319,12 @@ static void finish_if_sparse(struct progress *progress)
319
319
320
320
void stop_progress (struct progress * * p_progress )
321
321
{
322
+ if (!p_progress )
323
+ BUG ("don't provide NULL to stop_progress" );
324
+
322
325
finish_if_sparse (* p_progress );
323
326
324
- if (p_progress && * p_progress ) {
327
+ if (* p_progress ) {
325
328
trace2_data_intmax ("progress" , the_repository , "total_objects" ,
326
329
(* p_progress )-> total );
327
330
@@ -338,7 +341,12 @@ void stop_progress(struct progress **p_progress)
338
341
339
342
void stop_progress_msg (struct progress * * p_progress , const char * msg )
340
343
{
341
- struct progress * progress = * p_progress ;
344
+ struct progress * progress ;
345
+
346
+ if (!p_progress )
347
+ BUG ("don't provide NULL to stop_progress_msg" );
348
+
349
+ progress = * p_progress ;
342
350
if (!progress )
343
351
return ;
344
352
* p_progress = NULL ;
You can’t perform that action at this time.
0 commit comments