GNOME Bugzilla – Bug 744353
lua-factory: may_resolve doesn't handle media being NULL
Last modified: 2015-02-13 11:36:49 UTC
Created attachment 296637 [details] [review] lua-factory: Fix may_resolve with NULL media grl_lua_factory_source_may_resolve might be called with media being NULL (via expand_operation_keys in grl-source.c for example). Currently this case is not handled properly and may_resolve calls grl_data_has_key which results in a critical warning because media is NULL. This is one of the sources of some of the critical warnings when running gnome-music. I'm attaching a patch that handles this case by adding all required keys of the source to missing_keys since that is what seems to be what expand_operation_keys expects and what some other plugins (tmdb) seem to do as well. Some other plugins (metadata) and the example in the documentation however seem to indicate that simply returning FALSE would be enough.
Review of attachment 296637 [details] [review]: Could you please put the explanation you gave in the bug inside the commit message? The explanation is terse.
Created attachment 296685 [details] [review] lua-factory: Fix may_resolve with NULL media Updated the patch, please feel free to push if ACN since I don't have a git account.
Attachment 296685 [details] pushed as 1a21bfe - lua-factory: Fix may_resolve with NULL media