Code

don't call lyrics_init if plugin is disabled
authorMax Kellermann <max@duempel.org>
Thu, 25 Sep 2008 19:51:20 +0000 (21:51 +0200)
committerMax Kellermann <max@duempel.org>
Thu, 25 Sep 2008 19:51:20 +0000 (21:51 +0200)
If the lyrics screen is disabled at compile time, don't initialize the
lyrics library in main().

src/main.c

index 02b1680dc7d08774cdb875897262bb31c08c03bb..2d2b07c24939380bbc021ac8c5ed124a9bc92eda 100644 (file)
 #include "options.h"
 #include "conf.h"
 #include "command.h"
-#include "lyrics.h"
 #include "ncu.h"
 #include "screen.h"
 #include "screen_utils.h"
 #include "strfsong.h"
 #include "gcc.h"
 
+#ifdef ENABLE_LYRICS_SCREEN
+#include "lyrics.h"
+#endif
+
 #include <stdlib.h>
 #include <unistd.h>
 #include <signal.h>
@@ -420,7 +423,9 @@ main(int argc, const char *argv[])
 
        ncu_init();
 
+#ifdef ENABLE_LYRICS_SCREEN
        lyrics_init();
+#endif
 
        /* create mpdclient instance */
        mpd = mpdclient_new();