get_msc_cookie = xcb_dri2_get_msc_unchecked(c, pdraw->xDrawable);
get_msc_reply = xcb_dri2_get_msc_reply(c, get_msc_cookie, NULL);
+
+ if (!get_msc_reply)
+ return 0;
+
*ust = merge_counter(get_msc_reply->ust_hi, get_msc_reply->ust_lo);
*msc = merge_counter(get_msc_reply->msc_hi, get_msc_reply->msc_lo);
*sbc = merge_counter(get_msc_reply->sbc_hi, get_msc_reply->sbc_lo);
free(get_msc_reply);
- return 0;
+ return 1;
}
static int
divisor_hi, divisor_lo,
remainder_hi, remainder_lo);
wait_msc_reply = xcb_dri2_wait_msc_reply(c, wait_msc_cookie, NULL);
+
+ if (!wait_msc_reply)
+ return 0;
+
*ust = merge_counter(wait_msc_reply->ust_hi, wait_msc_reply->ust_lo);
*msc = merge_counter(wait_msc_reply->msc_hi, wait_msc_reply->msc_lo);
*sbc = merge_counter(wait_msc_reply->sbc_hi, wait_msc_reply->sbc_lo);
free(wait_msc_reply);
- return 0;
+ return 1;
}
static int
wait_sbc_cookie = xcb_dri2_wait_sbc_unchecked(c, pdraw->xDrawable,
target_sbc_hi, target_sbc_lo);
wait_sbc_reply = xcb_dri2_wait_sbc_reply(c, wait_sbc_cookie, NULL);
+
+ if (!wait_sbc_reply)
+ return 0;
+
*ust = merge_counter(wait_sbc_reply->ust_hi, wait_sbc_reply->ust_lo);
*msc = merge_counter(wait_sbc_reply->msc_hi, wait_sbc_reply->msc_lo);
*sbc = merge_counter(wait_sbc_reply->sbc_hi, wait_sbc_reply->sbc_lo);
free(wait_sbc_reply);
- return 0;
+ return 1;
}
/**