[cairo-commit] perf/cairo-perf-diff-files.c

M. Joonas Pihlaja joonas at kemper.freedesktop.org
Mon Dec 4 20:05:35 PST 2006


 perf/cairo-perf-diff-files.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletion(-)

New commits:
diff-tree 4057a98f88947730bb0678f361278cc71cc33751 (from a4f5463cdd5e2b088cd009de332db821ef0bd806)
Author: M Joonas Pihlaja <jpihlaja at cc.helsinki.fi>
Date:   Tue Dec 5 05:46:26 2006 +0200

    cairo-perf-diff-files: Don't segfault reading cooked perf reports.
    
    Fixes cairo-perf-diff-files for non-raw cairo-perf reports.  Similar
    to the patch on the mailing list, only applied to the caller of
    _cairo_stats_compute():
    
    http://lists.freedesktop.org/archives/cairo/2006-December/008720.html

diff --git a/perf/cairo-perf-diff-files.c b/perf/cairo-perf-diff-files.c
index ee9a71c..e6bb095 100644
--- a/perf/cairo-perf-diff-files.c
+++ b/perf/cairo-perf-diff-files.c
@@ -421,7 +421,8 @@ cairo_perf_report_sort_and_compute_stats
 		}
 	    }
 	}
-	_cairo_stats_compute (&base->stats, base->samples, base->samples_count);
+	if (base->samples)
+	    _cairo_stats_compute (&base->stats, base->samples, base->samples_count);
 	base = next;
     }
 }


More information about the cairo-commit mailing list