From 9884f8d092d846605ebb9359a68317437b42f7b1 Mon Sep 17 00:00:00 2001 From: Frank Neumann Date: Sun, 21 May 2017 21:05:19 +0200 Subject: Commit static-std-string.diff (thx mini73) --- common.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'common.c') diff --git a/common.c b/common.c index 5d1c058..b078e14 100644 --- a/common.c +++ b/common.c @@ -9,11 +9,13 @@ #define FRONTEND_DEVICE "/dev/dvb/adapter%d/frontend%d" -const std::string &SkinPath(void) +const std::string SkinPath(void) { // should never change - static std::string path = cPlugin::ConfigDirectory(PLUGIN_NAME_I18N); - return path; + static cString path; + if ((*path == NULL) || (strlen(*path) == 0)) + path = cPlugin::ConfigDirectory(PLUGIN_NAME_I18N); + return std::string(*path); } const char *ChannelNumber(const cChannel *Channel, int Number) -- cgit v1.2.3