This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch master
in repository efm2.

View the commit online.

commit 750f985e3c6de3c84abf012fdd96c9d340dcbe97
Author: Carsten Haitzler (Rasterman) <ras...@rasterman.com>
AuthorDate: Wed Sep 6 11:57:00 2023 +0100

    clean up dangling references to icons we freed to avoid segvs
---
 src/efm/efm.c      | 7 ++++++-
 src/efm/efm_util.c | 9 ++++++++-
 2 files changed, 14 insertions(+), 2 deletions(-)

diff --git a/src/efm/efm.c b/src/efm/efm.c
index 8600518..8e19d29 100644
--- a/src/efm/efm.c
+++ b/src/efm/efm.c
@@ -1235,7 +1235,12 @@ _reset(Smart_Data *sd)
    // clear out stuff there so we can start listing again...
    sd->file_max = 0;
    EINA_LIST_FREE(sd->blocks, block) _block_free(block);
-   EINA_LIST_FREE(sd->icons, icon) _icon_free(icon);
+   while (sd->icons)
+     {
+        icon = sd->icons->data;
+
+        _icon_free(icon);
+     }
    if (sd->reblock_job)
      {
         ecore_job_del(sd->reblock_job);
diff --git a/src/efm/efm_util.c b/src/efm/efm_util.c
index 739274a..33d5964 100644
--- a/src/efm/efm_util.c
+++ b/src/efm/efm_util.c
@@ -1387,10 +1387,17 @@ _icon_free(Icon *icon)
    if (icon->sd)
      {
         if (icon->sd->last_selected == icon) icon->sd->last_selected = NULL;
+        if (icon->sd->last_focused_before == icon) icon->sd->last_focused_before = NULL;
         if (icon->sd->last_focused == icon) icon->sd->last_focused = NULL;
-        if (icon->sd->over_icon == icon) _icon_over_off(icon);
+        if (icon->sd->drag_icon == icon) icon->sd->drag_icon = NULL;
+        if (icon->sd->over_icon == icon)
+          {
+             _icon_over_off(icon);
+             icon->sd->over_icon = NULL;
+          }
         if (icon->sd->drop_over == icon) icon->sd->drop_over = NULL;
         if (icon->sd->rename_icon == icon) _icon_rename_end(icon);
+        icon->sd->icons = eina_list_remove(icon->sd->icons, icon);
      }
    if (icon->block)
      {

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.

Reply via email to