mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-26 23:28:14 +03:00
Avoid crash in iconv destroy.
This commit is contained in:
parent
568a71daa0
commit
9b1dcb23f8
1 changed files with 8 additions and 2 deletions
|
@ -61,8 +61,14 @@ int c_setup_iconv(const char* to) {
|
|||
}
|
||||
|
||||
int c_close_iconv() {
|
||||
int ret_to = iconv_close(_iconvs.to);
|
||||
int ret_from = iconv_close(_iconvs.from);
|
||||
int ret_to = 0;
|
||||
int ret_from = 0;
|
||||
if( _iconvs.to != (iconv_t) NULL ) {
|
||||
ret_to = iconv_close(_iconvs.to);
|
||||
}
|
||||
if( _iconvs.from != (iconv_t) NULL ) {
|
||||
ret_from = iconv_close(_iconvs.from);
|
||||
}
|
||||
|
||||
if (ret_to == -1 || ret_from == -1)
|
||||
return -1;
|
||||
|
|
Loading…
Reference in a new issue