diff --git a/src/command/cmd_funcs.c b/src/command/cmd_funcs.c index 63e16415..51439237 100644 --- a/src/command/cmd_funcs.c +++ b/src/command/cmd_funcs.c @@ -4917,8 +4917,6 @@ cmd_sendfile(ProfWin* window, const char* const command, gchar** args) goto out; } - FILE* fh = fdopen(fd, "rb"); - gboolean omemo_enabled = FALSE; gboolean sendfile_enabled = TRUE; @@ -4952,6 +4950,8 @@ cmd_sendfile(ProfWin* window, const char* const command, gchar** args) goto out; } + FILE* fh = fdopen(fd, "rb"); + if (omemo_enabled) { #ifdef HAVE_OMEMO char* err = NULL;