talons

Fork of Claws Mail https://www.claws-mail
Log | Files | Refs | README | LICENSE

commit 98d87a84cf8dab0c8bdd30e33779f59f7b1dc5a7
parent ea331e758f3ed6211128d9478ef172e9a896d0e5
Author: Ricardo Mones <ricardo@mones.org>
Date:   Thu, 26 May 2022 20:55:20 +0200

Fix condition check at the end of function

Removes scaring traceback and emit a warning instead.

Diffstat:
Msrc/prefs_account.c | 15++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)

diff --git a/src/prefs_account.c b/src/prefs_account.c @@ -5113,17 +5113,17 @@ static void prefs_account_oauth2_copy_url(GtkButton *button, gpointer data) url = g_malloc(OAUTH2BUFSIZE+1); Oauth2Service service; const gchar * custom_client_id = NULL; - + int ret; + service = combobox_get_active_data(GTK_COMBO_BOX(optmenu)); - custom_client_id = gtk_entry_get_text((GtkEntry *)oauth2_page.oauth2_client_id_entry); - + oauth2_authorisation_url(service, &url, custom_client_id); - + win = gtk_widget_get_toplevel (optmenu); len = strlen(url); - + clip = gtk_widget_get_clipboard (win, GDK_SELECTION_PRIMARY); clip2 = gtk_widget_get_clipboard (win, GDK_SELECTION_CLIPBOARD); gtk_clipboard_set_text (clip, url, len); @@ -5147,8 +5147,9 @@ static void prefs_account_oauth2_copy_url(GtkButton *button, gpointer data) } debug_print("Starting oauth2 listener thread\n"); oauth2_listener_cancel = 0; - int ret = pthread_create(&oauth2_listener_tid, NULL, prefs_account_oauth2_listener, NULL); - cm_return_if_fail(ret != 0); + ret = pthread_create(&oauth2_listener_tid, NULL, prefs_account_oauth2_listener, NULL); + if (ret != 0) + g_warning("can't create thread: %d", ret); } static void prefs_account_oauth2_obtain_tokens(GtkButton *button, gpointer data)