netstar pushed a commit to branch master.

http://git.enlightenment.org/apps/evisum.git/commit/?id=8076a4b96ae4ee6daf01a18f6d7e3020a2b9c30b

commit 8076a4b96ae4ee6daf01a18f6d7e3020a2b9c30b
Author: Alastair Poole <nets...@gmail.com>
Date:   Wed Oct 17 10:20:54 2018 +0100

    ui: ensure we clean up properly before exit.
    
    Ensure timer callback gets cancelled before exitting
    the mainloop.
---
 src/ui.c | 5 +++++
 src/ui.h | 2 +-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/src/ui.c b/src/ui.c
index 3a94a9e..27aaef9 100644
--- a/src/ui.c
+++ b/src/ui.c
@@ -20,6 +20,8 @@ ui_shutdown(Ui *ui)
 {
    evas_object_hide(ui->win);
 
+   ui->shutting_down = EINA_TRUE;
+
    if (ui->thread_system)
      ecore_thread_cancel(ui->thread_system);
 
@@ -1109,6 +1111,9 @@ _process_panel_update(void *data)
 
    ui = data;
 
+   if (ui->shutting_down)
+     return ECORE_CALLBACK_CANCEL;
+
    proc = proc_info_by_pid(ui->selected_pid);
    if (!proc)
      {
diff --git a/src/ui.h b/src/ui.h
index c5c60f4..2d76fb9 100644
--- a/src/ui.h
+++ b/src/ui.h
@@ -109,7 +109,6 @@ typedef struct Ui
    pid_t         program_pid;
 
    Data_Unit     data_unit;
-   const char   *data_unit_symbol;
 
 #define TEXT_FIELD_MAX 65535
    char         *fields[PROCESS_INFO_FIELDS];
@@ -127,6 +126,7 @@ typedef struct Ui
    Sort_Type     sort_type;
    Eina_Bool     sort_reverse;
    Eina_Bool     panel_visible;
+   Eina_Bool     shutting_down;
 } Ui;
 
 Ui *

-- 


Reply via email to