Skip to content

Commit

Permalink
when passing no arg to bpmdisplay:setfromX, do nothing
Browse files Browse the repository at this point in the history
dont error 😃
  • Loading branch information
poco0317 committed Dec 20, 2022
1 parent 3d1dda6 commit f3b1919
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Etterna/Actor/Menus/BPMDisplay.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ class LunaBPMDisplay : public Luna<BPMDisplay>
}
static int SetFromSong(T* p, lua_State* L)
{
if (lua_isnil(L, 1)) {
if (lua_isnoneornil(L, 1)) {
p->NoBPM();
} else {
const Song* pSong = Luna<Song>::check(L, 1, true);
Expand All @@ -287,7 +287,7 @@ class LunaBPMDisplay : public Luna<BPMDisplay>
}
static int SetFromSteps(T* p, lua_State* L)
{
if (lua_isnil(L, 1)) {
if (lua_isnoneornil(L, 1)) {
p->NoBPM();
} else {
const Steps* pSteps = Luna<Steps>::check(L, 1, true);
Expand Down

0 comments on commit f3b1919

Please sign in to comment.