diff --git a/src/nhttpd/tuxboxapi/controlapi.cpp b/src/nhttpd/tuxboxapi/controlapi.cpp index 48643e144..73abec20b 100644 --- a/src/nhttpd/tuxboxapi/controlapi.cpp +++ b/src/nhttpd/tuxboxapi/controlapi.cpp @@ -1424,6 +1424,9 @@ std::string CControlAPI::_GetBouquetWriteItem(CyhookHandler *hh, CZapitChannel * //------------------------------------------------------------------------- void CControlAPI::GetBouquetCGI(CyhookHandler *hh) { + if (g_bouquetManager == NULL) + return; + TOutType outType = hh->outStart(true /*old mode*/); std::string result = ""; @@ -2165,6 +2168,9 @@ void CControlAPI::ReloadNeutrinoSetupCGI(CyhookHandler *hh) void CControlAPI::ReloadPluginsCGI(CyhookHandler *hh) { + if (g_Plugins == NULL) + return; + g_Plugins->loadPlugins(); hh->SendOk(); } diff --git a/src/nhttpd/tuxboxapi/neutrinoyparser.cpp b/src/nhttpd/tuxboxapi/neutrinoyparser.cpp index 9d7bc705b..500786078 100644 --- a/src/nhttpd/tuxboxapi/neutrinoyparser.cpp +++ b/src/nhttpd/tuxboxapi/neutrinoyparser.cpp @@ -228,6 +228,9 @@ std::string CNeutrinoYParser::func_get_bouquets_as_dropdown(CyhookHandler *, st std::string yresult, sel, nr_str, do_show_hidden; int nr=1; + if (g_bouquetManager == NULL) + return "0"; + ySplitString(para," ",nr_str, do_show_hidden); if(!nr_str.empty()) nr = atoi(nr_str.c_str()); @@ -255,6 +258,9 @@ std::string CNeutrinoYParser::func_get_bouquets_as_dropdown(CyhookHandler *, st //------------------------------------------------------------------------- std::string CNeutrinoYParser::func_get_bouquets_as_templatelist(CyhookHandler *, std::string para) { + if (g_bouquetManager == NULL) + return ""; + std::string yresult, ytemplate, do_show_hidden; ySplitString(para,"~",ytemplate, do_show_hidden); @@ -279,6 +285,9 @@ std::string CNeutrinoYParser::func_get_bouquets_as_templatelist(CyhookHandler * //------------------------------------------------------------------------- std::string CNeutrinoYParser::func_get_actual_bouquet_number(CyhookHandler *, std::string) { + if (g_bouquetManager == NULL) + return "0"; + int actual=0; for (int i = 0; i < (int) g_bouquetManager->Bouquets.size(); i++) { if(g_bouquetManager->existsChannelInBouquet(i, CZapit::getInstance()->GetCurrentChannelID())) { @@ -331,6 +340,10 @@ std::string CNeutrinoYParser::func_get_channels_as_dropdown(CyhookHandler *, st std::string CNeutrinoYParser::func_get_bouquets_with_epg(CyhookHandler *hh, std::string para) { int BouquetNr = 0; + + if (g_bouquetManager == NULL) + return "0"; + std::string abnumber, tmp,yresult; ZapitChannelList channels; //int num; @@ -1135,6 +1148,9 @@ std::string CNeutrinoYParser::func_set_timer_form(CyhookHandler *hh, std::strin hh->ParamList["timer_repeatCount"] = itoa(timer.repeatCount); // program row + if (g_bouquetManager == NULL) + return ""; + t_channel_id current_channel = (cmd == "new") ? CZapit::getInstance()->GetCurrentChannelID() : timer.channel_id; CBouquetManager::ChannelIterator cit = g_bouquetManager->tvChannelsBegin(); for (; !(cit.EndOfChannels()); cit++) { @@ -1184,6 +1200,9 @@ std::string CNeutrinoYParser::func_set_timer_form(CyhookHandler *hh, std::strin //------------------------------------------------------------------------- std::string CNeutrinoYParser::func_bouquet_editor_main(CyhookHandler *hh, std::string para) { + if (g_bouquetManager == NULL) + return "0"; + std::string yresult; int selected = -1; if (hh->ParamList["saved"] == "1")