diff --git a/nx/include/switch/applets/web.h b/nx/include/switch/applets/web.h index a6d1b33f..6d2653af 100644 --- a/nx/include/switch/applets/web.h +++ b/nx/include/switch/applets/web.h @@ -217,8 +217,8 @@ Result webPageCreate(WebCommonConfig* config, const char* url); /** * @brief Creates the config for WebApplet. This is based on \ref webPageCreate, for News. Hence other functions referencing \ref webPageCreate also apply to this. - * @note Sets ::WebArgType_UnknownD to value 1, and sets ::WebArgType_NewsFlag to true. Also uses \ref webConfigSetEcClientCert and \ref webConfigSetShopJump with flag=true. * @note The domain from the input URL is automatically whitelisted, in addition to any already loaded whitelist. + * @note Sets ::WebArgType_UnknownD to value 1, and sets ::WebArgType_NewsFlag to true. Also uses \ref webConfigSetEcClientCert and \ref webConfigSetShopJump with flag=true. * @param config WebCommonConfig object. * @param url Initial URL navigated to by the applet. */ diff --git a/nx/source/applets/web.c b/nx/source/applets/web.c index 853b8eac..3b4160b4 100644 --- a/nx/source/applets/web.c +++ b/nx/source/applets/web.c @@ -593,20 +593,22 @@ Result webConfigSetPageScrollIndicator(WebCommonConfig* config, bool flag) { } Result webConfigShow(WebCommonConfig* config, WebCommonReply *out) { - void* reply; - size_t size; + void* reply = NULL; + size_t size = 0; - // ShareApplet on [3.0.0+] uses TLV storage for the reply, while older versions + everything else uses *ReturnValue. - memset(out, 0, sizeof(*out)); - if (config->version >= 0x30000 && _webGetShimKind(config) == WebShimKind_Share) out->type = true; + if (out) { + // ShareApplet on [3.0.0+] uses TLV storage for the reply, while older versions + everything else uses *ReturnValue. + memset(out, 0, sizeof(*out)); + if (config->version >= 0x30000 && _webGetShimKind(config) == WebShimKind_Share) out->type = true; - if (!out->type) { - reply = &out->ret; - size = sizeof(out->ret); - } - else { - reply = &out->storage; - size = sizeof(out->storage); + if (!out->type) { + reply = &out->ret; + size = sizeof(out->ret); + } + else { + reply = &out->storage; + size = sizeof(out->storage); + } } return _webShow(&config->holder, config->appletid, config->version, &config->arg, sizeof(config->arg), reply, size);