Skip to content

Commit

Permalink
Add missing nullptr check for Captive Portal Deconstructor (would del…
Browse files Browse the repository at this point in the history
…ete loopTask) (#154)

Co-authored-by: HentaiHeavenVR <[email protected]>
  • Loading branch information
2 people authored and LucHeart committed Jan 22, 2024
1 parent 48a7be0 commit 4d7d88a
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions src/CaptivePortalInstance.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -95,14 +95,15 @@ CaptivePortalInstance::CaptivePortalInstance()
request->send(
200,
"text/plain",
// Raw string literal (1+ to remove the first newline)
1+R"(
// Raw string literal (1+ to remove the first newline)
1 + R"(
You probably forgot to upload the Filesystem with PlatformIO!
Go to PlatformIO -> Platform -> Upload Filesystem Image!
If this happened with a file we provided or you just need help, come to the Discord!
discord.gg/openshock
)");
discord.gg/OpenShock
)"
);
});
}

Expand All @@ -116,8 +117,10 @@ discord.gg/openshock
}

CaptivePortalInstance::~CaptivePortalInstance() {
vTaskDelete(m_taskHandle);

if (m_taskHandle != nullptr) {
vTaskDelete(m_taskHandle);
m_taskHandle = nullptr;
}
m_webServer.end();
m_socketServer.close();
}
Expand Down

0 comments on commit 4d7d88a

Please sign in to comment.