1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-11-04 08:17:17 -05:00

lookup_unique_name: Handle NULL from expand_tilde

expand_tilde() returns NULL if out of memory.
Make lookup_unique_name() handle that.
This commit is contained in:
Kalle Olavi Niemitalo 2009-07-21 00:50:44 +03:00 committed by Kalle Olavi Niemitalo
parent e6344340dd
commit f815d27835

View File

@ -671,6 +671,10 @@ lookup_unique_name(struct terminal *term, unsigned char *ofile,
int overwrite;
ofile = expand_tilde(ofile);
if (!ofile) {
callback(term, NULL, data, resume & ~DOWNLOAD_RESUME_SELECTED);
return;
}
/* Minor code duplication to prevent useless call to get_opt_int()
* if possible. --Zas */