Skip to content

Commit

Permalink
Minor tweak
Browse files Browse the repository at this point in the history
  • Loading branch information
R-YaTian committed Sep 30, 2024
1 parent 0b8f8ea commit 7ea20c7
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions TWLMagician.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# coding=utf-8

# TWLMagician
# Version 1.3.0
# Version 1.3.1
# Author: R-YaTian
# Original "HiyaCFW-Helper" Author: mondul <[email protected]>

Expand Down Expand Up @@ -753,10 +753,8 @@ def hiya(self):
if not self.adv_mode:
if self.setup_operation.get() == 2 or self.nand_operation.get() == 2:
if sysname == 'Windows' and ctypes.windll.shell32.IsUserAnAdmin() == 0:
root.withdraw()
showerror(_('错误'), _('此功能需要以管理员权限运行本工具'))
root.destroy()
exit(1)
return

if not self.nand_mode:
self.have_hiya = False
Expand Down Expand Up @@ -846,8 +844,9 @@ def closethread(self):
self.uh_chk['state'] = DISABLED
self.dkp1_chk['state'] = DISABLED
self.ag1_chk['state'] = DISABLED
self.dialog.destroy()
self.dialog = None
if self.dialog is not None:
self.dialog.destroy()
self.dialog = None
if self.finish:
self.finish = False
return
Expand Down

0 comments on commit 7ea20c7

Please sign in to comment.