mirror of
https://github.com/davatorium/rofi.git
synced 2024-11-18 13:54:36 -05:00
[View] Work around GThreadPool 1 pointer bug.
* Also fix typo in icon fetcher.
This commit is contained in:
parent
0bf0c51827
commit
af6fb83a51
2 changed files with 10 additions and 1 deletions
|
@ -94,7 +94,7 @@ static void rofi_icon_fetch_entry_free(gpointer data);
|
|||
IconFetcher *rofi_icon_fetcher_data = NULL;
|
||||
|
||||
static void rofi_icon_fetch_thread_pool_entry_remove(gpointer data) {
|
||||
IconFetcherNameEntry *entry = (IconFetcherNameEntry *)data;
|
||||
IconFetcherEntry *entry = (IconFetcherEntry *)data;
|
||||
// Mark it in a way it should be re-fetched on next query?
|
||||
}
|
||||
static void rofi_icon_fetch_entry_free(gpointer data) {
|
||||
|
|
|
@ -2653,6 +2653,15 @@ static int rofi_thread_workers_sort(gconstpointer a, gconstpointer b,
|
|||
|
||||
static void rofi_thread_pool_state_free(gpointer data) {
|
||||
if (data) {
|
||||
// This is a weirdness from glib that should not happen.
|
||||
// It pushes in a 1 to msg sleeping threads to wake up.
|
||||
// This should be removed from queue to avoid hitting this method.
|
||||
// In practice, we still hit it (and crash)
|
||||
if (GPOINTER_TO_UINT(data) == 1) {
|
||||
// Ignore this entry.
|
||||
g_debug("Glib thread-pool bug, received pointer with value 1.");
|
||||
return;
|
||||
}
|
||||
thread_state *ts = (thread_state *)data;
|
||||
if (ts->free) {
|
||||
ts->free(data);
|
||||
|
|
Loading…
Reference in a new issue