diff options
author | Alon Levy <alevy@redhat.com> | 2011-04-04 15:52:02 +0300 |
---|---|---|
committer | Alon Levy <alevy@redhat.com> | 2011-04-07 19:01:48 +0300 |
commit | e97ffc5f9285575c6dbc9953182e56b23e7490d4 (patch) | |
tree | a951ade8100d0f478e990af9e178c03e604cba64 | |
parent | d7eb10ad7dc29b07d3018ed925975e9ce3d8dea5 (diff) |
display/res: turn two asserts in CursorCacheRemove to debug prints
In Free build this is defined out anyway, but in checked build this assert
triggers, so change it to a debug print (pending investigation on why
someone thought at some point it should never happen).
The asserts were on:
cursor->unique != 0
function end not reached
-rw-r--r-- | display/res.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/display/res.c b/display/res.c index 5dc6e10..1b8cf84 100644 --- a/display/res.c +++ b/display/res.c @@ -2778,7 +2778,10 @@ static void CursorCacheRemove(PDev *pdev, InternalCursor *cursor) DEBUG_PRINT((pdev, 12, "%s\n", __FUNCTION__)); - ASSERT(pdev, cursor->unique); + if (!cursor->unique) { + DEBUG_PRINT((pdev, 1, "%s: cursor not unique\n", __FUNCTION__)); + return; + } internal = &pdev->Res->cursor_cache[CURSOR_HASH_VAL(cursor->hsurf)]; while (*internal) { @@ -2794,7 +2797,7 @@ static void CursorCacheRemove(PDev *pdev, InternalCursor *cursor) } internal = &(*internal)->next; } - ASSERT(pdev, FALSE); + DEBUG_PRINT((pdev, 0, "%s: Error: should not reach this\n", __FUNCTION__)); } static void CursorCacheAdd(PDev *pdev, InternalCursor *cursor) |