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
@ -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…
x
Reference in New Issue
Block a user