prevent segfault
In case we're not connected yet and press Alt+c a segfault occurred since `conn.xmpp_conn` is dereferenced while it's still `NULL`. Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
This commit is contained in:
@@ -51,6 +51,9 @@ get_message_from_editor(gchar* message, gchar** returned_message)
|
||||
{
|
||||
// create editor dir if not present
|
||||
char* jid = connection_get_barejid();
|
||||
if (!jid) {
|
||||
return TRUE;
|
||||
}
|
||||
gchar* path = files_get_account_data_path(DIR_EDITOR, jid);
|
||||
free(jid);
|
||||
if (g_mkdir_with_parents(path, S_IRWXU) != 0) {
|
||||
|
||||
Reference in New Issue
Block a user