diff options
Diffstat (limited to 'trace-graph.c')
-rw-r--r-- | trace-graph.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/trace-graph.c b/trace-graph.c index 44c1273..4e91fe8 100644 --- a/trace-graph.c +++ b/trace-graph.c | |||
@@ -1666,14 +1666,17 @@ static gint draw_event_label(struct graph_info *ginfo, gint i, | |||
1666 | */ | 1666 | */ |
1667 | ret = trace_graph_plot_display_last_event(ginfo, plot, &s, | 1667 | ret = trace_graph_plot_display_last_event(ginfo, plot, &s, |
1668 | convert_x_to_time(ginfo, p2-1)); | 1668 | convert_x_to_time(ginfo, p2-1)); |
1669 | trace_seq_destroy(&s); | 1669 | if (!ret) { |
1670 | if (!ret) | 1670 | trace_seq_destroy(&s); |
1671 | return p2; | 1671 | return p2; |
1672 | } | ||
1672 | 1673 | ||
1673 | layout = gtk_widget_create_pango_layout(ginfo->draw, s.buffer); | 1674 | layout = gtk_widget_create_pango_layout(ginfo->draw, s.buffer); |
1674 | pango_layout_set_font_description(layout, font); | 1675 | pango_layout_set_font_description(layout, font); |
1675 | pango_layout_get_pixel_size(layout, &text_width, &text_height); | 1676 | pango_layout_get_pixel_size(layout, &text_width, &text_height); |
1676 | 1677 | ||
1678 | trace_seq_destroy(&s); | ||
1679 | |||
1677 | /* Lets see if we can print this info */ | 1680 | /* Lets see if we can print this info */ |
1678 | if (p2 < text_width) | 1681 | if (p2 < text_width) |
1679 | start = 1; | 1682 | start = 1; |
@@ -1967,7 +1970,6 @@ static void draw_timeline(struct graph_info *ginfo, gint width) | |||
1967 | convert_nano(time, &sec, &usec); | 1970 | convert_nano(time, &sec, &usec); |
1968 | trace_seq_init(&s); | 1971 | trace_seq_init(&s); |
1969 | trace_seq_printf(&s, "%lu.%06lu", sec, usec); | 1972 | trace_seq_printf(&s, "%lu.%06lu", sec, usec); |
1970 | trace_seq_destroy(&s); | ||
1971 | 1973 | ||
1972 | gdk_draw_line(ginfo->curr_pixmap, ginfo->draw->style->black_gc, | 1974 | gdk_draw_line(ginfo->curr_pixmap, ginfo->draw->style->black_gc, |
1973 | mid, height, mid, height + 5); | 1975 | mid, height, mid, height + 5); |
@@ -1978,6 +1980,7 @@ static void draw_timeline(struct graph_info *ginfo, gint width) | |||
1978 | gdk_draw_layout(ginfo->curr_pixmap, ginfo->draw->style->black_gc, | 1980 | gdk_draw_layout(ginfo->curr_pixmap, ginfo->draw->style->black_gc, |
1979 | mid - (w / 2), height+10, layout); | 1981 | mid - (w / 2), height+10, layout); |
1980 | g_object_unref(layout); | 1982 | g_object_unref(layout); |
1983 | trace_seq_destroy(&s); | ||
1981 | } | 1984 | } |
1982 | } | 1985 | } |
1983 | 1986 | ||