summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Huddleston <jeremyhu@apple.com>2010-08-01 11:41:58 -0700
committerJeremy Huddleston <jeremyhu@apple.com>2010-08-19 19:50:10 -0700
commit7a8a3ca6859d0f5374f048e88dd96f1034e311c1 (patch)
tree343ad92fcab38ce94bdd282d3e9a78c8c01b2db6
parente03b08f4f236065f4bbda7acf76a794402b8c385 (diff)
XQuartz: xpr: Bail on errors during unlock and destroyserver-1.4-apple
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> (cherry picked from commit 5d1d9d9ae39fab2ee2ac085f9776f82768828dc8)
-rw-r--r--hw/xquartz/xpr/xprFrame.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/hw/xquartz/xpr/xprFrame.c b/hw/xquartz/xpr/xprFrame.c
index 53aa0eab7..162e004fa 100644
--- a/hw/xquartz/xpr/xprFrame.c
+++ b/hw/xquartz/xpr/xprFrame.c
@@ -206,13 +206,16 @@ xprCreateFrame(RootlessWindowPtr pFrame, ScreenPtr pScreen,
static void
xprDestroyFrame(RootlessFrameID wid)
{
+ xp_error err;
TA_SERVER();
pthread_mutex_lock(&window_hash_mutex);
x_hash_table_remove(window_hash, wid);
pthread_mutex_unlock(&window_hash_mutex);
- xp_destroy_window(x_cvt_vptr_to_uint(wid));
+ err = xp_destroy_window(x_cvt_vptr_to_uint(wid));
+ if (err != Success)
+ FatalError("Could not destroy window %i.", (int)x_cvt_vptr_to_uint(wid));
}
@@ -366,9 +369,12 @@ xprStartDrawing(RootlessFrameID wid, char **pixelData, int *bytesPerRow)
static void
xprStopDrawing(RootlessFrameID wid, Bool flush)
{
+ xp_error err;
TA_SERVER();
- xp_unlock_window(x_cvt_vptr_to_uint(wid), flush);
+ err = xp_unlock_window(x_cvt_vptr_to_uint(wid), flush);
+ if(err != Success)
+ FatalError("Could not unlock window %i after drawing.", (int)x_cvt_vptr_to_uint(wid));
}