mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Don't call strdup on NULL by mistake
Hunting down a different issue I managed to cause a crash here when trying to copy a string that ended up being NULL. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
6cf3787a0e
commit
6ce0afb99c
1 changed files with 1 additions and 1 deletions
|
@ -651,7 +651,7 @@ void MainTab::reload()
|
|||
#define EDIT_TEXT(what) \
|
||||
if (same_string(mydive->what, cd->what)) { \
|
||||
free(mydive->what); \
|
||||
mydive->what = strdup(displayed_dive.what); \
|
||||
mydive->what = copy_string(displayed_dive.what); \
|
||||
}
|
||||
|
||||
#define EDIT_VALUE(what) \
|
||||
|
|
Loading…
Add table
Reference in a new issue