diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/win32/mod.rs | 5 | 
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())); +            }          }      }  }  | 
