Skip to content

Commit

Permalink
glpclview: Don't crash when init fails, just keep retrying
Browse files Browse the repository at this point in the history
Signed-off-by: Hector Martin <[email protected]>
  • Loading branch information
marcan committed Dec 6, 2010
1 parent 50db38b commit 82d7b6b
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions examples/glpclview.c
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,12 @@ void DrawGLScene()
short *depth = 0;
char *rgb = 0;
uint32_t ts;
freenect_sync_get_depth((void**)&depth, &ts);
freenect_sync_get_rgb((void**)&rgb, &ts);
if (freenect_sync_get_depth((void**)&depth, &ts) < 0)
return;
if (freenect_sync_get_rgb((void**)&rgb, &ts) < 0) {
free(depth);
return;
}

static unsigned int indices[480][640];
static short xyz[480][640][3];
Expand Down

0 comments on commit 82d7b6b

Please sign in to comment.