- if (errorPixel >= 0) {
- fprintf(stderr,
- " Found at pixel #%d along %s edge.\n", errorPixel, errorEdge);
- } else {
- fprintf(stderr,
- " Found along %s edge.\n", errorEdge);
+ if (errorEdge != NULL) {
+ if (errorPixel >= 0) {
+ fprintf(stderr,
+ " Found at pixel #%d along %s edge.\n", errorPixel, errorEdge);
+ } else {
+ fprintf(stderr,
+ " Found along %s edge.\n", errorEdge);
+ }