Skip to content

Commit

Permalink
fix(wallpaper): prevent crashing on right-click.
Browse files Browse the repository at this point in the history
  • Loading branch information
amnweb committed Oct 24, 2024
1 parent ff3ff1c commit ba5e5a7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/widgets/yasb/wallpapers.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,9 +221,9 @@ def change_background(self, image_path: str = None):
new_wallpaper = image_path
else:
"""Randomly select a new wallpaper and prevent the same wallpaper from being selected """
new_wallpaper = random.choice(wallpapers)
while new_wallpaper == self._last_image and len(wallpapers) > 1:
new_wallpaper = random.choice(wallpapers)
new_wallpaper = random.choice(wallpapers)

try:
self.set_wallpaper(new_wallpaper)
Expand Down

0 comments on commit ba5e5a7

Please sign in to comment.