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)
319319
320320void stop_progress (struct progress * * p_progress )
321321{
322+ if (!p_progress )
323+ BUG ("don't provide NULL to stop_progress" );
324+
322325 finish_if_sparse (* p_progress );
323326
324- if (p_progress && * p_progress ) {
327+ if (* p_progress ) {
325328 trace2_data_intmax ("progress" , the_repository , "total_objects" ,
326329 (* p_progress )-> total );
327330
@@ -338,7 +341,12 @@ void stop_progress(struct progress **p_progress)
338341
339342void stop_progress_msg (struct progress * * p_progress , const char * msg )
340343{
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 ;
342350 if (!progress )
343351 return ;
344352 * p_progress = NULL ;
You can’t perform that action at this time.
0 commit comments