Commit e5b9a22a2075f9227032544aa1b5a99fb7b7e956
1 parent
f883ce69
Exists in
master
and in
5 other branches
Removendo warning desnecessário quando uma sessão de transferência de arquivos é…
… fechada mais de uma vez.
Showing
1 changed file
with
4 additions
and
0 deletions
Show diff stats
src/lib3270/ft.c
| @@ -79,10 +79,12 @@ static void set_ft_state(H3270FT *session, LIB3270_FT_STATE state); | @@ -79,10 +79,12 @@ static void set_ft_state(H3270FT *session, LIB3270_FT_STATE state); | ||
| 79 | 79 | ||
| 80 | H3270FT * get_ft_handle(H3270 *hSession) | 80 | H3270FT * get_ft_handle(H3270 *hSession) |
| 81 | { | 81 | { |
| 82 | + /* | ||
| 82 | if(!hSession->ft) | 83 | if(!hSession->ft) |
| 83 | { | 84 | { |
| 84 | popup_an_error(hSession,_( "Unexpected call to %s: No active filetransfer" ),__FUNCTION__); | 85 | popup_an_error(hSession,_( "Unexpected call to %s: No active filetransfer" ),__FUNCTION__); |
| 85 | } | 86 | } |
| 87 | + */ | ||
| 86 | return hSession->ft; | 88 | return hSession->ft; |
| 87 | } | 89 | } |
| 88 | 90 | ||
| @@ -139,6 +141,8 @@ static void set_ft_state(H3270FT *session, LIB3270_FT_STATE state); | @@ -139,6 +141,8 @@ static void set_ft_state(H3270FT *session, LIB3270_FT_STATE state); | ||
| 139 | CHECK_SESSION_HANDLE(hSession); | 141 | CHECK_SESSION_HANDLE(hSession); |
| 140 | 142 | ||
| 141 | ft = get_ft_handle(hSession); | 143 | ft = get_ft_handle(hSession); |
| 144 | + if(!ft) | ||
| 145 | + return EINVAL; | ||
| 142 | 146 | ||
| 143 | if (ft->state == LIB3270_FT_STATE_RUNNING) | 147 | if (ft->state == LIB3270_FT_STATE_RUNNING) |
| 144 | { | 148 | { |