From b2ed16cd7bbe75d1ce469364693466237f6f092a Mon Sep 17 00:00:00 2001 From: Bart van Strien Date: Wed, 19 Dec 2018 11:04:36 +0100 Subject: [PATCH] Error when trying to create a queueable source with newSource (issue #1450) --- src/modules/audio/wrap_Audio.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/modules/audio/wrap_Audio.cpp b/src/modules/audio/wrap_Audio.cpp index 68a929928..19423f6e1 100644 --- a/src/modules/audio/wrap_Audio.cpp +++ b/src/modules/audio/wrap_Audio.cpp @@ -52,6 +52,9 @@ int w_newSource(lua_State *L) const char *stypestr = luaL_checkstring(L, 2); if (stypestr && !Source::getConstant(stypestr, stype)) return luax_enumerror(L, "source type", Source::getConstants(stype), stypestr); + + if (stype == Source::TYPE_QUEUE) + return luaL_error(L, "Cannot create queueable sources using newSource. Use newQueueableSource instead."); } if (lua_isstring(L, 1) || luax_istype(L, 1, love::filesystem::File::type) || luax_istype(L, 1, love::filesystem::FileData::type))