This is an automated email from the git hooks/post-receive script.
git pushed a commit to branch devs/dimmus/meson
in repository efl.
View the commit online.
commit eabde1f8fbc944d9ba2e315f88f6906c5db32ef0
Author: dimmus <dmitri.chudi...@gmail.com>
AuthorDate: Mon Jun 3 18:47:01 2024 +0500
efl_ui_textbox: fix sd->scroller=null error
Can be called by efl_ui_widget_scroll_hold_{pop, push} from another widget (ex., efl_ui_slider) without _efl_ui_textbox_scrollable_set() invocation with undefined sd->scroller here as the result. So, check if sd->scroll is true to avoid this.
The same for *_freeze_set.
---
src/lib/elementary/efl_ui_textbox.c | 19 +++++++++++++++----
1 file changed, 15 insertions(+), 4 deletions(-)
diff --git a/src/lib/elementary/efl_ui_textbox.c b/src/lib/elementary/efl_ui_textbox.c
index b58b3a2c08..79055ecad7 100644
--- a/src/lib/elementary/efl_ui_textbox.c
+++ b/src/lib/elementary/efl_ui_textbox.c
@@ -3349,8 +3349,15 @@ _efl_ui_textbox_efl_ui_scrollable_scroll_hold_get(const Eo *obj EINA_UNUSED, Efl
EOLIAN static void
_efl_ui_textbox_efl_ui_scrollable_scroll_hold_set(Eo *obj EINA_UNUSED, Efl_Ui_Textbox_Data *sd, Eina_Bool hold)
{
- EINA_SAFETY_ON_NULL_RETURN(sd->scroller);
- efl_ui_scrollable_scroll_hold_set(sd->scroller, !!hold);
+ /* Can be called by efl_ui_widget_scroll_hold_{pop, push} from another
+ * widget (ex., efl_ui_slider) without _efl_ui_textbox_scrollable_set()
+ * invocation with undefined sd->scroller here as the result.
+ * So, check if sd->scroll is true to avoid this. */
+ if(sd->scroll)
+ {
+ EINA_SAFETY_ON_NULL_RETURN(sd->scroller);
+ efl_ui_scrollable_scroll_hold_set(sd->scroller, !!hold);
+ }
}
EOLIAN static Eina_Bool
@@ -3363,8 +3370,12 @@ _efl_ui_textbox_efl_ui_scrollable_scroll_freeze_get(const Eo *obj EINA_UNUSED, E
EOLIAN static void
_efl_ui_textbox_efl_ui_scrollable_scroll_freeze_set(Eo *obj EINA_UNUSED, Efl_Ui_Textbox_Data *sd, Eina_Bool freeze)
{
- EINA_SAFETY_ON_NULL_RETURN(sd->scroller);
- efl_ui_scrollable_scroll_freeze_set(sd->scroller, !!freeze);
+ /* The same as for hold_set. See comments above. */
+ if(sd->scroll)
+ {
+ EINA_SAFETY_ON_NULL_RETURN(sd->scroller);
+ efl_ui_scrollable_scroll_freeze_set(sd->scroller, !!freeze);
+ }
}
EOLIAN static void
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.