Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BundleDownloaderComponent.Dispose 时 空指针异常 #192

Open
MagicOrangeKKSK opened this issue Sep 3, 2020 · 0 comments
Open

BundleDownloaderComponent.Dispose 时 空指针异常 #192

MagicOrangeKKSK opened this issue Sep 3, 2020 · 0 comments

Comments

@MagicOrangeKKSK
Copy link

base.Dispose();
中将parent设置为空
this.parent = null;
导致后面
this.Parent.RemoveComponent<BundleDownloaderComponent>();
空指针异常 ,删除改行即可

public override void Dispose()
		{
			if (this.IsDisposed)
			{
				return;
			}

			if (this.Parent.IsDisposed)
			{
				return;
			}

			base.Dispose();

			this.remoteVersionConfig = null;
			this.TotalSize = 0;
			this.bundles = null;
			this.downloadedBundles = null;
			this.downloadingBundle = null;
			this.webRequest?.Dispose();
		}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant