#490 closed defect (fixed)
MERGE tool crashes on save-as
Reported by: | epruesse | Owned by: | westram |
---|---|---|---|
Priority: | blocker | Milestone: | arb6 |
Component: | no idea | Version: | SVN |
Keywords: | Cc: | fog@… |
Description (last modified by westram)
Change History (12)
comment:1 Changed 11 years ago by epruesse
- Cc fog@… added
comment:2 Changed 11 years ago by westram
- Owner changed from devel to westram
- Status changed from new to assigned
comment:3 Changed 11 years ago by westram
comment:4 follow-up: ↓ 7 Changed 11 years ago by epruesse
That's what I meant. Do you want to fix, or should I? (Forgot to assign to me… I was following it right now)
comment:5 follow-up: ↓ 6 Changed 11 years ago by epruesse
And… do we go for a hotfix or do we move the concept of <awar_filebrowser_base>/name to hold the selected file name into AW_file.cxx? There seems to be duplication/similarity between MG_main.cxx:filename_changed_cb and NT_main.cxx:AWAR_DB_PATH_changed_cb
comment:6 in reply to: ↑ 5 Changed 11 years ago by westram
Replying to epruesse:
And… do we go for a hotfix or do we move the concept of <awar_filebrowser_base>/name to hold the selected file name into AW_file.cxx? There seems to be duplication/similarity between MG_main.cxx:filename_changed_cb and NT_main.cxx:AWAR_DB_PATH_changed_cb
It's very easy to break things concerned with filebrowsers, because of circular awar callbacks - so i wouldn't fiddle to much, at least not b4 arb6
comment:7 in reply to: ↑ 4 Changed 11 years ago by westram
Replying to epruesse:
That's what I meant. Do you want to fix, or should I? (Forgot to assign to me… I was following it right now)
me2 - let's compare solutions and decide then
comment:8 Changed 11 years ago by westram
=================================================================== --- MERGE/MG_main.cxx (revision 11809) +++ MERGE/MG_main.cxx (working copy) @@ -393,13 +393,14 @@ inline const char *get_awar_name(const c } static void filename_changed_cb(AW_root *awr, const char *awar_base_name) { - AW_awar *name_awar = awr->awar(get_awar_name(awar_base_name, "name")); AW_awar *filename_awar = awr->awar(get_awar_name(awar_base_name, "file_name")); char *name; char *suffix; GB_split_full_path(filename_awar->read_char_pntr(), NULL, NULL, &name, &suffix); + if (name) { + AW_awar *name_awar = awr->awar(get_awar_name(awar_base_name, "name")); const char *shown_name; if (strcmp(name, ":") == 0 && !suffix) { shown_name = ": (DB loaded in ARB_NT)"; @@ -408,6 +409,7 @@ static void filename_changed_cb(AW_root shown_name = GB_append_suffix(name, suffix); } name_awar->write_string(shown_name); + } free(name); free(suffix);
comment:9 Changed 11 years ago by westram
- Description modified (diff)
comment:10 follow-up: ↓ 11 Changed 11 years ago by epruesse
I had the same, just w/o moving name_awar into the if clause.
Commit and forget. I'll create a file-browser refactor ticket.
(Although I am curious as to how this came about…)
comment:11 in reply to: ↑ 10 Changed 11 years ago by westram
- Resolution set to fixed
- Status changed from assigned to closed
comment:12 Changed 11 years ago by epruesse
See also #491
I only get a crash if i click on a directory: