Package: monsterz
Version: 0.7.1-11+b1
Severity: minor

to reproduce:
New Game-> *click on something, that is not a link* -> *crashes*

For example I clicked into the upper left corner:

Traceback (most recent call last):
  File "/usr/share/games/monsterz/monsterz.py", line 2043, in <module>
    main()
  File "/usr/share/games/monsterz/monsterz.py", line 2038, in main
    monsterz.go()
  File "/usr/share/games/monsterz/monsterz.py", line 1288, in go
    iterator()
  File "/usr/share/games/monsterz/monsterz.py", line 1565, in iterate_new
    elif event.type == MOUSEBUTTONDOWN and narea >= 10:
TypeError: '>=' not supported between instances of 'NoneType' and 'int'


A quick fix would be to check if narea is None.

--- monsterz.py 2020-07-11 20:26:48.000000000 +0700
+++ /tmp/monsterz.py    2020-07-11 20:25:58.314438447 +0700
@@ -1562,7 +1562,7 @@
                 system.play('whip')
                 self.status = STATUS_MENU
                 return
-            elif event.type == MOUSEBUTTONDOWN and narea >= 10:
+            elif event.type == MOUSEBUTTONDOWN and narea is not None and narea 
>= 10:
                 system.play('whip')
                 if narea == ACTION_MOREMONSTERZ:
                     if items < 8:

Attachment: signature.asc
Description: This is a digitally signed message part.

Reply via email to