Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix crash caused by screensaver or display sleep #4

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

averello
Copy link

When the display goes to sleep (or the screensaver starts) the
macantumbra application crashes as the CGDisplayCreateImageForRect()
function returns NULL.

The fix checks to see if the image returned from
CGDisplayCreateImageForRect is NULL, in this case it handles the error
by not proceeding with the application logic. It then calls the same
function after a delay of some seconds. When the display wakes up then
the fix restarts the application logic.

Signed-off-by: Georges Boumis [email protected]

When the display goes to sleep (or the screensaver starts) the
macantumbra application crashes as the CGDisplayCreateImageForRect()
function returns NULL.

The fix checks to see if the image returned from
CGDisplayCreateImageForRect is NULL, in this case it handles the error
by not proceeding with the application logic. It then calls the same
function after a delay of some seconds. When the display wakes up then
the fix restarts the application logic.

Signed-off-by: Georges Boumis <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant