From b05b2b3aaa21d9b5cfd43fee08e9a6831d96258a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Tue, 4 May 2021 14:28:06 +0300 Subject: [PATCH] examples/overlaycomposition: Fix compilation with cairo API changes --- examples/src/bin/overlay-composition.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/src/bin/overlay-composition.rs b/examples/src/bin/overlay-composition.rs index 6ac1ad958..3fdca7e5b 100644 --- a/examples/src/bin/overlay-composition.rs +++ b/examples/src/bin/overlay-composition.rs @@ -181,11 +181,11 @@ fn create_pipeline() -> Result { ) .unwrap(); - let cr = cairo::Context::new(&surface); + let cr = cairo::Context::new(&surface).expect("Failed to create cairo context"); cr.save().expect("Failed to save state"); cr.set_operator(cairo::Operator::Clear); - cr.paint(); + cr.paint().expect("Failed to clear background"); cr.restore().expect("Failed to restore state"); // The image we draw (the text) will be static, but we will change the