From 1a9fa6f7383dd4c79a25614b2438645cfa8ec572 Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Sun, 23 Oct 2022 16:59:30 +0100 Subject: select: Fix blank pseudo style reversion --- src/select/select.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/select/select.c b/src/select/select.c index 0735641..da0aa61 100644 --- a/src/select/select.c +++ b/src/select/select.c @@ -1161,6 +1161,14 @@ static css_error css__select_revert_property_to_origin( { css_error error; + if (select_state->results->styles[pseudo] == NULL) { + return CSS_OK; + } + + if (select_state->revert[origin].style[pseudo] == NULL) { + return prop_dispatch[property].initial(select_state); + } + error = prop_dispatch[property].copy( select_state->revert[origin].style[pseudo], select_state->results->styles[pseudo]); -- cgit v1.2.1