Skip to content

Commit

Permalink
Merge pull request opencv#7935 from alalek:fix_waitKey
Browse files Browse the repository at this point in the history
  • Loading branch information
vpisarev committed Jan 10, 2017
2 parents c0cde75 + d015b55 commit b345c6e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/highgui/src/window.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ int cv::waitKey(int delay)
if (use_legacy > 0)
return code;
#endif
return code & 0xff;
return (code != -1) ? (code & 0xff) : -1;
}

int cv::createTrackbar(const String& trackbarName, const String& winName,
Expand Down

0 comments on commit b345c6e

Please sign in to comment.