Browse Source

deps/obs-scripting: Don't crash obs trying to unload a script that failed to load

Colin Edwards 8 years ago
parent
commit
1b49a0541e
1 changed files with 1 additions and 1 deletions
  1. 1 1
      deps/obs-scripting/obs-scripting-lua.c

+ 1 - 1
deps/obs-scripting/obs-scripting-lua.c

@@ -206,7 +206,7 @@ fail:
 		pthread_mutex_unlock(&data->mutex);
 	}
 
-	if (!success) {
+	if (!success && script) {
 		lua_close(script);
 	}