add multiple checks for missing sprites to avoid ic hanging
This commit is contained in:
parent
a85fbf0ab3
commit
346a521907
20
gameview.py
20
gameview.py
@ -336,7 +336,12 @@ class AOCharMovie(QtGui.QLabel):
|
||||
AOpath+"characters/"+p_char+"/"+p_emote+".gif",
|
||||
AOpath+"characters/"+p_char+"/(a)"+p_emote+".gif"
|
||||
)
|
||||
alt_path = AOpath+"characters/"+p_char+"/"+p_emote+".png"
|
||||
alt_path = test_path(
|
||||
AOpath+"characters/"+p_char+"/"+emote_prefix+p_emote+".png",
|
||||
AOpath+"characters/"+p_char+"/"+emote_prefix+"/"+p_emote+".png",
|
||||
AOpath+"characters/"+p_char+"/"+p_emote+".png",
|
||||
AOpath+"characters/"+p_char+"/(a)"+p_emote+".png"
|
||||
)
|
||||
apng_path = test_path(
|
||||
AOpath+"characters/"+p_char+"/"+emote_prefix+p_emote+".apng",
|
||||
AOpath+"characters/"+p_char+"/"+emote_prefix+"/"+p_emote+".apng",
|
||||
@ -351,8 +356,6 @@ class AOCharMovie(QtGui.QLabel):
|
||||
)
|
||||
placeholder_path = AO2XPpath+"themes/default/oldplaceholder.gif"
|
||||
gif_path = ""
|
||||
|
||||
print apng_path, emote_prefix+p_emote
|
||||
|
||||
if apng_path:
|
||||
gif_path = apng_path
|
||||
@ -395,12 +398,19 @@ class AOCharMovie(QtGui.QLabel):
|
||||
else:
|
||||
gif_path = ""
|
||||
self.use_pillow = 0
|
||||
|
||||
#if gif_path == placeholder_path or
|
||||
|
||||
if gif_path == "":
|
||||
gif_path = self.prev_gif_path
|
||||
# Second check just in case
|
||||
if gif_path == "":
|
||||
if exists(placeholder_path):
|
||||
gif_path = placeholder_path
|
||||
else:
|
||||
gif_path = ""
|
||||
else:
|
||||
self.prev_gif_path = gif_path
|
||||
|
||||
print "[debug]", p_char, emote_prefix, p_emote, "(!) path is null!" if gif_path == "" else gif_path
|
||||
|
||||
if not self.use_pillow:
|
||||
self.m_movie.stop()
|
||||
|
Loading…
Reference in New Issue
Block a user