Fixed am51051 - unpause() returning true on stopped plugins

This commit is contained in:
Steve Dudenhoeffer 2007-02-19 06:43:52 +00:00
parent 06f01ea7dc
commit fff603635a
2 changed files with 2 additions and 1 deletions

View File

@ -98,6 +98,7 @@ public:
inline void setError(const char* n) { errorMsg.assign(n); }
inline bool isValid() const { return (status >= ps_paused); }
inline bool isPaused() const { return ((status == ps_paused) || (status == ps_stopped)); }
inline bool isStopped() const { return (status == ps_stopped); }
inline bool isExecutable(int id) const { return (isValid() && !isPaused()); }
void Finalize();

View File

@ -2453,7 +2453,7 @@ static cell AMX_NATIVE_CALL unpause(AMX *amx, cell *params) /* 3 param */
else
plugin = g_plugins.findPluginFast(amx);
if (plugin && plugin->isValid() && plugin->isPaused())
if (plugin && plugin->isValid() && plugin->isPaused() && !plugin->isStopped())
{
plugin->unpausePlugin();
return 1;