client: Don't cancel a roundtrip when any event is received
Since wl_display_dispatch() returns the number of processed events or -1 on error, only cancel the roundtrip if an -1 is returned. This also fixes a potential memory corruption bug happening when wl_display_roundtrip() does an early return and the callback later writes to the then out of scope stack allocated `done' parameter. Introduced by 33b7637b. Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Loading
Please register or sign in to comment