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

git pushed a commit to branch master
in repository enventor.

View the commit online.

commit 80af06bf7641d34c8ed339594dd0bf2548fc8b03
Author: Thanatermesis <[email protected]>
AuthorDate: Mon Feb 23 15:51:02 2026 -0500

    fix: Prevent memory leak and respect configured window size
    
    I have identified a few issues in src/bin/base_gui.c:
    
    1 Memory Leak: In base_gui_init, if panes_init or any subsequent initialization fails, the base_data structure bd (assigned to g_bd) is not freed before returning EINA_FALSE.
    2 Redundant Semicolon: There is a double semicolon in base_console_auto_hide.
    3 Potential Logic Error: In base_gui_show, evas_object_resize is called with INIT_WIN_W and INIT_WIN_H every time the window is shown. This overrides the window size loaded
    from configuration in base_gui_init. I will remove the hardcoded resize to respect the configuration.
---
 src/bin/base_gui.c | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/src/bin/base_gui.c b/src/bin/base_gui.c
index 3d419cb..405ddf6 100644
--- a/src/bin/base_gui.c
+++ b/src/bin/base_gui.c
@@ -277,7 +277,7 @@ void
 base_console_auto_hide(void)
 {
    base_data *bd = g_bd;
-   EINA_SAFETY_ON_NULL_RETURN(bd);;
+   EINA_SAFETY_ON_NULL_RETURN(bd);
 
    if (!config_console_get()) return;
    if (bd->console_msg) return;
@@ -384,10 +384,12 @@ base_gui_init(void)
 
    //Panes
    Evas_Object *panes = panes_init(layout);
+   if (!panes) goto error;
    elm_object_part_content_set(layout, "elm.swallow.panes", panes);
 
    //Console
    Evas_Object *console = console_create(panes);
+   if (!console) goto error;
    panes_console_set(console);
 
    if (config_console_get())
@@ -395,16 +397,19 @@ base_gui_init(void)
 
    //File Browser
    Evas_Object *file_browser = file_browser_init(layout);
+   if (!file_browser) goto error;
    elm_object_part_content_set(layout, "elm.swallow.file_browser",
                                file_browser);
    file_browser_workspace_set(config_workspace_path_get());
 
    //EDC Navigator
    Evas_Object *edc_navigator = edc_navigator_init(layout);
+   if (!edc_navigator) goto error;
    elm_object_part_content_set(layout, "elm.swallow.edc_navigator",
                                edc_navigator);
    //File Tab
    Evas_Object *file_tab = file_tab_init(layout);
+   if (!file_tab) goto error;
    elm_object_part_content_set(layout, "elm.swallow.file_tab", file_tab);
 
    bd->win = win;
@@ -412,6 +417,10 @@ base_gui_init(void)
    bd->console = console;
 
    return EINA_TRUE;
+
+error:
+   base_gui_term();
+   return EINA_FALSE;
 }
 
 void
@@ -420,7 +429,7 @@ base_gui_show(void)
    base_data *bd = g_bd;
    EINA_SAFETY_ON_NULL_RETURN(bd);
 
-   evas_object_resize(bd->win, INIT_WIN_W, INIT_WIN_H);
+   /* Note: Window size is set in base_gui_init from config */
    evas_object_show(bd->win);
 }
 

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

Reply via email to