Fix crash when calling quitAndUpdate without any update.
This commit is contained in:
parent
6b3ff63358
commit
b932461b45
1 changed files with 5 additions and 1 deletions
|
@ -80,7 +80,11 @@ void AutoUpdater::CheckForUpdates(
|
||||||
void AutoUpdater::QuitAndInstall(
|
void AutoUpdater::QuitAndInstall(
|
||||||
const v8::FunctionCallbackInfo<v8::Value>& args) {
|
const v8::FunctionCallbackInfo<v8::Value>& args) {
|
||||||
AutoUpdater* self = AutoUpdater::Unwrap<AutoUpdater>(args.This());
|
AutoUpdater* self = AutoUpdater::Unwrap<AutoUpdater>(args.This());
|
||||||
|
|
||||||
|
if (!self->quit_and_install_.is_null()) {
|
||||||
self->quit_and_install_.Run();
|
self->quit_and_install_.Run();
|
||||||
|
self->quit_and_install_.Reset();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// static
|
// static
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue