Fix possible crash in list_pluginpref()