Skip to content

Commit

Permalink
Check that display was opened successfully.
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewFromMelbourne committed Jan 21, 2016
1 parent 512cf55 commit 4e1d3d9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Binary file modified raspi2png
Binary file not shown.
6 changes: 5 additions & 1 deletion raspi2png.c
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,11 @@ main(

if (displayHandle == 0)
{
fprintf(stderr, "%s: unable to open display\n", program);
fprintf(stderr,
"%s: unable to open display %d\n",
program,
displayNumber);

exit(EXIT_FAILURE);
}

Expand Down

0 comments on commit 4e1d3d9

Please sign in to comment.