diff options
| author | chevalam <chevalam.s@samsung.com> | 2014-05-16 11:09:09 +0530 |
|---|---|---|
| committer | Bryce Harrington <b.harrington@samsung.com> | 2014-05-21 17:12:12 -0700 |
| commit | a4c5c2c1eda8a297a2b0f7a5357e999df209974f (patch) | |
| tree | 5f83160173444e39c2cbeecf4ce87a90e411c2a1 /src/cairo-tests/fill.cpp | |
| parent | 226dd607a3797d9f8ee5f1071fe76e8f65bff842 (diff) | |
Initialization fixes to avert crashes
ref: https://github.com/SRA-SiliconValley/caskbench/issues/29
Diffstat (limited to 'src/cairo-tests/fill.cpp')
| -rw-r--r-- | src/cairo-tests/fill.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/cairo-tests/fill.cpp b/src/cairo-tests/fill.cpp index 69bfc55..26e1893 100644 --- a/src/cairo-tests/fill.cpp +++ b/src/cairo-tests/fill.cpp @@ -30,7 +30,7 @@ void drawshapes(caskbench_context_t *ctx,kinetics_t *particles) r = 0.9 * element_spacing /2; int old_x, old_y,old_width, old_height; cairo_pattern_t *pattern; - cairo_surface_t *image; + cairo_surface_t *image = NULL; double red, green, blue, alpha; static const double dashed3[] = {1.0}; static const double dashed2[] = {14.0, 6.0}; @@ -171,7 +171,7 @@ void drawshapes(caskbench_context_t *ctx,kinetics_t *particles) cx = x + 2*r * star_points[0][0]/200.0; cy = y + 2*r * star_points[0][1]/200.0; rr = r; - x1 = x + 2*r * star_points[p][0]/200.0 - r; + x1 = x + 2*r * star_points[0][0]/200.0 - r; x2 = y + 2*r * star_points[0][1]/200.0 + r; break; |