aboutsummaryrefslogtreecommitdiffstats
path: root/sway/desktop/transaction.c
diff options
context:
space:
mode:
Diffstat (limited to 'sway/desktop/transaction.c')
-rw-r--r--sway/desktop/transaction.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/sway/desktop/transaction.c b/sway/desktop/transaction.c
index ccda1963..a9c9cb58 100644
--- a/sway/desktop/transaction.c
+++ b/sway/desktop/transaction.c
@@ -316,7 +316,14 @@ static void transaction_commit(struct sway_transaction *transaction) {
316 // Set up a timer which the views must respond within 316 // Set up a timer which the views must respond within
317 transaction->timer = wl_event_loop_add_timer(server.wl_event_loop, 317 transaction->timer = wl_event_loop_add_timer(server.wl_event_loop,
318 handle_timeout, transaction); 318 handle_timeout, transaction);
319 wl_event_source_timer_update(transaction->timer, txn_timeout_ms); 319 if (transaction->timer) {
320 wl_event_source_timer_update(transaction->timer, txn_timeout_ms);
321 } else {
322 wlr_log(WLR_ERROR, "Unable to create transaction timer. "
323 "There might not be any available file descriptors. "
324 "Some imperfect frames might be rendered.");
325 handle_timeout(transaction);
326 }
320 } 327 }
321 328
322 // The debug tree shows the pending/live tree. Here is a good place to 329 // The debug tree shows the pending/live tree. Here is a good place to