XQuartz: xpr: Bail on errors during unlock and destroy
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
This commit is contained in:
parent
ee7fd8fc58
commit
5d1d9d9ae3
|
@ -206,13 +206,16 @@ xprCreateFrame(RootlessWindowPtr pFrame, ScreenPtr pScreen,
|
||||||
static void
|
static void
|
||||||
xprDestroyFrame(RootlessFrameID wid)
|
xprDestroyFrame(RootlessFrameID wid)
|
||||||
{
|
{
|
||||||
|
xp_error err;
|
||||||
TA_SERVER();
|
TA_SERVER();
|
||||||
|
|
||||||
pthread_mutex_lock(&window_hash_mutex);
|
pthread_mutex_lock(&window_hash_mutex);
|
||||||
x_hash_table_remove(window_hash, wid);
|
x_hash_table_remove(window_hash, wid);
|
||||||
pthread_mutex_unlock(&window_hash_mutex);
|
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
|
static void
|
||||||
xprStopDrawing(RootlessFrameID wid, Bool flush)
|
xprStopDrawing(RootlessFrameID wid, Bool flush)
|
||||||
{
|
{
|
||||||
|
xp_error err;
|
||||||
TA_SERVER();
|
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));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user