Mercurial > hg > dmlib
changeset 793:21ad08cdf408
Fix a potential NULL pointer usage.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Fri, 18 Oct 2013 14:31:12 +0300 |
parents | bfb1d2bacd54 |
children | 319792b2af4a |
files | tests/plrtest.c |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/tests/plrtest.c Thu Aug 15 14:09:18 2013 +0300 +++ b/tests/plrtest.c Fri Oct 18 14:31:12 2013 +0300 @@ -219,7 +219,7 @@ BOOL playing = TRUE; while (playing) { - JSSPattern *pattern; + JSSPattern *pattern = NULL; int currRow, prevRow; JSS_LOCK(plr); @@ -236,7 +236,7 @@ SDL_Delay(50); } - if (playing) + if (playing && pattern != NULL) { printRow(stdout, pattern, currRow); printf("\n");