mirror of
https://git.jabber.space/devs/cproof.git
synced 2026-07-18 16:36:20 +00:00
fix(ai): unlock mutex before early return in error callback
The mutex was not released when the aiwin pointer was invalid, leading to a potential deadlock in the AI thread.
This commit is contained in:
@@ -110,6 +110,7 @@ _aiwin_display_error(gpointer user_data, const gchar* error_msg)
|
||||
ProfAiWin* aiwin = _aiwin_validate(user_data);
|
||||
if (!aiwin) {
|
||||
log_warning("[AI-THREAD] Cannot display error: aiwin is invalid or window was closed (msg: %s)", error_msg);
|
||||
pthread_mutex_unlock(&lock);
|
||||
return;
|
||||
}
|
||||
aiwin_display_error(aiwin, error_msg);
|
||||
|
||||
Reference in New Issue
Block a user