diff options
| author | Matthias Melcher <github@matthiasm.com> | 2023-08-26 16:10:02 +0200 |
|---|---|---|
| committer | Matthias Melcher <github@matthiasm.com> | 2023-08-26 16:10:02 +0200 |
| commit | 3ed43363cd77542c2fbc41aed173d6dd3296a4a2 (patch) | |
| tree | 32e14a3e059741c3d76cfe23539321dd9162b094 /fluid | |
| parent | 94a75b012f3557687574df6533296c1a4ef51b3e (diff) | |
FLUID: fixes file path calculation bug
Diffstat (limited to 'fluid')
| -rw-r--r-- | fluid/alignment_panel.cxx | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/fluid/alignment_panel.cxx b/fluid/alignment_panel.cxx index f9f093e94..fa01f5e7e 100644 --- a/fluid/alignment_panel.cxx +++ b/fluid/alignment_panel.cxx @@ -484,16 +484,17 @@ static void cb_w_layout_menu_save(Fl_Menu_*, void*) { fnfc.filter("FLUID Layouts\t*.fll\n"); if (g_layout_list.filename_) { char *fn = fl_strdup(g_layout_list.filename_); - char *name = (char*)fl_filename_name(g_layout_list.filename_); + char *name = (char*)fl_filename_name(fn); if (name > fn) { name[-1] = 0; fnfc.directory(fn); fnfc.preset_file(name); - ::free(fn); } else if (name) { fnfc.preset_file(name); - ::free(fn); + } else { + fnfc.preset_file(""); } + ::free(fn); } if (fnfc.show() != 0) return; const char *new_filename = fnfc.filename(); |
