diff options
Diffstat (limited to 'src/clientserver.c')
-rw-r--r-- | src/clientserver.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/src/clientserver.c b/src/clientserver.c index 2a091a6e97..dfbb8a8b03 100644 --- a/src/clientserver.c +++ b/src/clientserver.c @@ -157,22 +157,22 @@ serverConvert( char_u *res = data; *tofree = NULL; - if (client_enc != NULL && p_enc != NULL) - { - vimconv_T vimconv; + if (client_enc == NULL || p_enc == NULL) + return res; - vimconv.vc_type = CONV_NONE; - if (convert_setup(&vimconv, client_enc, p_enc) != FAIL - && vimconv.vc_type != CONV_NONE) - { - res = string_convert(&vimconv, data, NULL); - if (res == NULL) - res = data; - else - *tofree = res; - } - convert_setup(&vimconv, NULL, NULL); + vimconv_T vimconv; + + vimconv.vc_type = CONV_NONE; + if (convert_setup(&vimconv, client_enc, p_enc) != FAIL + && vimconv.vc_type != CONV_NONE) + { + res = string_convert(&vimconv, data, NULL); + if (res == NULL) + res = data; + else + *tofree = res; } + convert_setup(&vimconv, NULL, NULL); return res; } #endif |