aboutsummaryrefslogtreecommitdiffstats
path: root/src/tools/g2/view1.c
diff options
context:
space:
mode:
authorDave Barach <dave@barachs.net>2017-04-04 08:00:23 -0400
committerDamjan Marion <dmarion.lists@gmail.com>2017-04-04 16:34:44 +0000
commita8ed6bd9ded4cbfff01f49571272e59def9f4010 (patch)
tree4bf659925e0ae4f5a170fef9ffa1451d93d8de3b /src/tools/g2/view1.c
parent2c2b6407129461e183bc8ad5964cddc98ed1626c (diff)
Clear pid-vector, to avoid spurious track selection
Change-Id: Ibc293aa1305126920c0b2c44df1f7a7d5ae9ea9d Signed-off-by: Dave Barach <dave@barachs.net>
Diffstat (limited to 'src/tools/g2/view1.c')
-rw-r--r--src/tools/g2/view1.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/tools/g2/view1.c b/src/tools/g2/view1.c
index c524c8119aa..c5f799dc0bc 100644
--- a/src/tools/g2/view1.c
+++ b/src/tools/g2/view1.c
@@ -998,7 +998,7 @@ static void move_current_track(GdkEventButton *event,
found:
pid_index = i + vp->first_pid_index;
- new_pidvec = g_malloc(sizeof(pid_sort_t)*g_npids);
+ new_pidvec = g_malloc0(sizeof(pid_sort_t)*g_npids);
pold = g_pids;
pnew = new_pidvec;
@@ -1743,7 +1743,7 @@ static void chase_event_etc(enum chase_mode mode)
datum_to_chase = ep->datum;
pid_to_chase = ep->pid->pid_value;
pids_mapped = 0;
- new_pidvec = g_malloc(sizeof(pid_sort_t)*g_npids);
+ new_pidvec = g_malloc0(sizeof(pid_sort_t)*g_npids);
while (1) {
if (srch_chase_dir == SRCH_CHASE_FORWARD) {