Skip to content
  • Pavel Borzenkov's avatar
    Fix ':close' command · caccb94c
    Pavel Borzenkov authored and Sebastian Ramacher's avatar Sebastian Ramacher committed
    
    
    Currently, zathura crashes while performing ':close' command with the
    following error:
    
    GThread-ERROR **: file gthread-posix.c: line 226
    (g_cond_free_posix_impl): error 'Device or resource busy' during
    'pthread_cond_destroy ((pthread_cond_t *) cond)'
    
    The error is because 'render' thread holds condition variable while
    waiting for new pages to render. This patch modifies zathura's code to
    correctly kill render thread and free allocated resources when the
    document is being closed.
    
    NOTE: should be applied on top of "Allow changing of "pages-per-row"
    variable at runtime" commit to avoid conflicts in the
    'page_view_set_mode()' function.
    
    Signed-off-by: default avatarPavel Borzenkov <pavel.borzenkov@gmail.com>
    caccb94c