diff options
author | Antenore Gatta <antenore@simbiosi.org> | 2018-05-16 23:01:19 +0300 |
---|---|---|
committer | Antenore Gatta <antenore@simbiosi.org> | 2018-05-16 23:01:19 +0300 |
commit | a2d841788abdaadaa51b87898ec84278464cb81d (patch) | |
tree | 14ed90096db5ed2b429399322d35c41c409d3a28 /plugins/exec | |
parent | 4a428273c61ae1c47dbcf84ca458cb5848b6d704 (diff) |
Error test outside the condition
Diffstat (limited to 'plugins/exec')
-rw-r--r-- | plugins/exec/exec_plugin.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/plugins/exec/exec_plugin.c b/plugins/exec/exec_plugin.c index a3991d4a3..d3c8242ab 100644 --- a/plugins/exec/exec_plugin.c +++ b/plugins/exec/exec_plugin.c @@ -226,14 +226,14 @@ static gboolean remmina_plugin_exec_run(RemminaProtocolWidget *gp) &stderr_buffer, // STDERR NULL, // Exit status &error); - } - if (!error) { - remmina_plugin_service->log_printf("[%s] Command executed\n", PLUGIN_NAME); - gtk_text_buffer_set_text (gpdata->log_buffer, stdout_buffer, -1); - }else { - g_warning("Command %s exited with error: %s\n", cmd, error->message); - gtk_text_buffer_set_text (gpdata->log_buffer, error->message, -1); - g_error_free(error); + if (!error) { + remmina_plugin_service->log_printf("[%s] Command executed\n", PLUGIN_NAME); + gtk_text_buffer_set_text (gpdata->log_buffer, stdout_buffer, -1); + }else { + g_warning("Command %s exited with error: %s\n", cmd, error->message); + gtk_text_buffer_set_text (gpdata->log_buffer, error->message, -1); + g_error_free(error); + } } g_strfreev(argv); |