Rockbox open source high quality audio player as a Music Player Daemon
mpris rockbox mpd libadwaita audio rust zig deno
2
fork

Configure Feed

Select the types of activity you want to include in your feed.

[bugfix] ensure tree_context dirfilter is restored on plugin exit

rockpaint is the only plugin doing anything dit setting the dirfilter pointer
it appears to restore it but this is cheap insurance on weird crashes
that result..

Change-Id: I70c826d6ec4c9cb6e1539ab23f1de82ca3e67ad1

authored by

William Wilgus and committed by
William Wilgus
9bcf6a8b f3a858e1

+7 -7
+7 -7
apps/plugin.c
··· 913 913 #endif 914 914 ) 915 915 { 916 - lc_close(current_plugin_handle); 917 - current_plugin_handle = NULL; 918 - splash(HZ*2, ID2P(LANG_PLUGIN_WRONG_MODEL)); 919 - return -1; 916 + hdr = NULL; 920 917 } 921 918 922 - if (hdr->api_version != PLUGIN_API_VERSION || 919 + if (hdr == NULL || hdr->api_version != PLUGIN_API_VERSION || 923 920 p_hdr->api_size > sizeof(struct plugin_api)) 924 921 { 925 922 lc_close(current_plugin_handle); 926 923 current_plugin_handle = NULL; 927 - splash(HZ*2, ID2P(LANG_PLUGIN_WRONG_VERSION)); 924 + splash(HZ*2, hdr ? ID2P(LANG_PLUGIN_WRONG_VERSION) 925 + : ID2P(LANG_PLUGIN_WRONG_MODEL)); 928 926 return -1; 929 927 } 930 928 ··· 969 967 970 968 int rc = p_hdr->entry_point(parameter); 971 969 972 - tree_unlock_cache(tree_get_context()); 970 + struct tree_context *tc = tree_get_context(); 971 + tree_unlock_cache(tc); 972 + tc->dirfilter = &global_settings.dirfilter; 973 973 974 974 pop_current_activity_without_refresh(); 975 975 if (get_current_activity() != ACTIVITY_WPS)