The sequence lives in the object header, which is containing the shm struct. The code was reading before the dummy_shm variable and sometimes asserted that the sequence isn't initialized to zero.
Fixes a random wineserver crash, sorry about that.
From: Rémi Bernon rbernon@codeweavers.com
The sequence lives in the object header, which is containing the shm struct. The code was reading before the dummy_shm variable and sometimes asserted that the sequence isn't initialized to zero. --- server/queue.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/server/queue.c b/server/queue.c index 9ccd93c4280..ee03ceb55c8 100644 --- a/server/queue.c +++ b/server/queue.c @@ -624,11 +624,12 @@ void set_clip_rectangle( struct desktop *desktop, const rectangle_t *rect, unsig /* change the foreground input and reset the cursor clip rect */ static void set_foreground_input( struct desktop *desktop, struct thread_input *input ) { - const input_shm_t *input_shm, *old_input_shm, dummy_shm = {0}; + const input_shm_t *input_shm, *old_input_shm; + shared_object_t dummy_obj = {0};
if (desktop->foreground_input == input) return; - input_shm = input ? input->shared : &dummy_shm; - old_input_shm = desktop->foreground_input ? desktop->foreground_input->shared : &dummy_shm; + input_shm = input ? input->shared : &dummy_obj.shm.input; + old_input_shm = desktop->foreground_input ? desktop->foreground_input->shared : &dummy_obj.shm.input;
set_clip_rectangle( desktop, NULL, SET_CURSOR_NOCLIP, 1 ); desktop->foreground_input = input;