diff --git a/stepmania/src/Sprite.cpp b/stepmania/src/Sprite.cpp index a059a7889b..cdac2adb9c 100644 --- a/stepmania/src/Sprite.cpp +++ b/stepmania/src/Sprite.cpp @@ -963,8 +963,15 @@ class LunaSprite: public Luna public: static int Load( T* p, lua_State *L ) { - RageTextureID ID( SArg(1) ); - p->Load( ID ); + if( lua_isnil(L, 1) ) + { + p->UnloadTexture(); + } + else + { + RageTextureID ID( SArg(1) ); + p->Load( ID ); + } return 0; } static int LoadBackground( T* p, lua_State *L )