aboutsummaryrefslogtreecommitdiffstats
path: root/src/win32
diff options
context:
space:
mode:
Diffstat (limited to 'src/win32')
-rw-r--r--src/win32/mod.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/win32/mod.rs b/src/win32/mod.rs
index da94c70..e3920a8 100644
--- a/src/win32/mod.rs
+++ b/src/win32/mod.rs
@@ -191,7 +191,10 @@ impl Window {
/// See the docs if the crate root file.
pub fn swap_buffers(&self) {
unsafe {
- ffi::SwapBuffers(self.hdc);
+ if ffi::SwapBuffers(self.hdc) == 0 {
+ use std::os;
+ fail!("{}", os::error_string(os::errno()));
+ }
}
}
}