diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2006-10-14 10:06:16 +0200 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2006-10-14 10:06:16 +0200 |
commit | 7bed3fd6ba154c108872f357a9e8e247122da411 (patch) | |
tree | 81b832a9655ebe3bb9b6b768ef0d5eb6215f194b /vdr.c | |
parent | 6a15d77429968ae372ae23be9deca7c57a44bfe5 (diff) | |
download | vdr-7bed3fd6ba154c108872f357a9e8e247122da411.tar.gz vdr-7bed3fd6ba154c108872f357a9e8e247122da411.tar.bz2 |
Fixed displaying the error log message in case an unknown plugin was requested in a key macro
Diffstat (limited to 'vdr.c')
-rw-r--r-- | vdr.c | 25 |
1 files changed, 14 insertions, 11 deletions
@@ -22,7 +22,7 @@ * * The project's page is at http://www.cadsoft.de/vdr * - * $Id: vdr.c 1.279 2006/09/01 12:57:44 kls Exp $ + * $Id: vdr.c 1.280 2006/10/14 10:01:32 kls Exp $ */ #include <getopt.h> @@ -923,17 +923,20 @@ int main(int argc, char *argv[]) case kCommands: DirectMainFunction(osCommands); break; case kUser1 ... kUser9: cRemote::PutMacro(key); key = kNone; break; case k_Plugin: { - DELETE_MENU; - if (cControl::Control()) - cControl::Control()->Hide(); - cPlugin *plugin = cPluginManager::GetPlugin(cRemote::GetPlugin()); - if (plugin) { - Menu = plugin->MainMenuAction(); - if (Menu) - Menu->Show(); + const char *PluginName = cRemote::GetPlugin(); + if (PluginName) { + DELETE_MENU; + if (cControl::Control()) + cControl::Control()->Hide(); + cPlugin *plugin = cPluginManager::GetPlugin(PluginName); + if (plugin) { + Menu = plugin->MainMenuAction(); + if (Menu) + Menu->Show(); + } + else + esyslog("ERROR: unknown plugin '%s'", PluginName); } - else - esyslog("ERROR: unknown plugin '%s'", cRemote::GetPlugin()); key = kNone; // nobody else needs to see these keys } break; |