Repository: lutris/lutris

Issue:
[issue] AttributeError 'NoneType' when calling dll_manager.version.lower()
### Bug description

Trying to install Star Citizen, when Lutris try to install DLLs it throw an error. `NoneType' object has no attribute 'lower'`.
I realize is similar to the #3787 and I was using 0.5.9.1, and I upgraded to 0.5.10, but it is not the same.

```bash
ERROR    2022-04-12 00:42:28,265 [jobs.target:36]:Error while completing task <bound method CommandsMixin.task of <interpreter.ScriptInterpreter object at 0x7f5ff2393880 (lutris+installer+interpreter+ScriptInterpreter at 0x2b6ed40)>>: <class 'AttributeError'> 'NoneType' object has no attribute 'lower'
  File "/usr/lib64/python3.9/site-packages/lutris/util/jobs.py", line 34, in target
    result = self.function(*args, **kwargs)
  File "/usr/lib64/python3.9/site-packages/lutris/installer/commands.py", line 436, in task
    command = task(**data)
  File "/usr/lib64/python3.9/site-packages/lutris/runners/commands/wine.py", line 346, in winetricks
    return wineexec(
  File "/usr/lib64/python3.9/site-packages/lutris/runners/commands/wine.py", line 299, in wineexec
    wine.prelaunch()
  File "/usr/lib64/python3.9/site-packages/lutris/runners/wine.py", line 799, in prelaunch
    self.setup_dlls(
  File "/usr/lib64/python3.9/site-packages/lutris/runners/wine.py", line 776, in setup_dlls
    if dll_manager.version.lower() != "manual":
ERROR    2022-04-12 00:42:28,266 [interpreter._iter_commands:302]:Last install command failed, show error
```

### How to Reproduce

Steps to reproduce the behavior:
1. Try to install Star Citizen
2. After clicking on Install the problem arise

### Expected behavior

Install the game.

### Log output

```shell
INFO     2022-04-12 00:54:54,131 [startup.init_lutris:173]:Starting Lutris 0.5.10
WARNING  2022-04-12 00:54:54,159 [libretro.get_libretro_cores:24]:No folder at /home/schenkel/.local/share/lutris/runners/retroarch/
DEBUG    2022-04-12 00:54:54,167 [xrandr._get_vidmodes:15]:Retrieving video modes from XrandR
INFO     2022-04-12 00:54:54,199 [startup.check_driver:65]:Running AMD Mesa driver 21.3.8 on AMD Radeon RX 6800 XT (SIENNA_CICHLID, DRM 3.44.0, 5.17.2, LLVM 13.0.1) (0x73bf)
INFO     2022-04-12 00:54:54,199 [startup.check_driver:77]:GPU: 1002:73BF 1043:04F2 (amdgpu drivers)
WARNING: radv is not a conformant Vulkan implementation, testing use only.
INFO     2022-04-12 00:54:54,278 [startup.update_runtime:213]:Startup complete
DEBUG    2022-04-12 00:54:54,430 [lutriswindow.update_store:437]:Showing 0 games
DEBUG    2022-04-12 00:54:56,837 [application.show_window:332]:Showing window AddGamesWindow{}
DEBUG    2022-04-12 00:55:01,559 [http.get:83]:GET https://lutris.net/api/games?search=star+citizen&with-installers=True
DEBUG    2022-04-12 00:55:02,957 [api.get_game_installers:160]:Fetching installer https://lutris.net/api/installers/star-citizen
DEBUG    2022-04-12 00:55:02,958 [http.get:83]:GET https://lutris.net/api/installers/star-citizen
DEBUG    2022-04-12 00:55:03,380 [application.show_window:332]:Showing window InstallerWindowstar-citizen
DEBUG    2022-04-12 00:55:03,381 [application.on_app_window_destroyed:350]:Removed window AddGamesWindow{}
DEBUG    2022-04-12 00:55:04,146 [xrandr._get_vidmodes:15]:Retrieving video modes from XrandR
DEBUG    2022-04-12 00:55:05,568 [interpreter.get_extras:159]:Checking if service provide extra files
DEBUG    2022-04-12 00:55:05,568 [installer.prepare_game_files:146]:No service to retrieve files from
DEBUG    2022-04-12 00:55:05,582 [interpreter.create_game_folder:181]:Creating destination path /home/schenkel/Games/star-citizen
DEBUG    2022-04-12 00:55:07,036 [downloader.start:65]:⬇ https://install.robertsspaceindustries.com/star-citizen/RSI-Setup-1.5.4.exe
DEBUG    2022-04-12 00:55:12,200 [downloader.download_cb:125]:Finished downloading https://install.robertsspaceindustries.com/star-citizen/RSI-Setup-1.5.4.exe
INFO     2022-04-12 00:55:12,547 [file_box.on_download_complete:252]:Download completed
DEBUG    2022-04-12 00:55:12,547 [files_box.on_file_available:93]:client is available
INFO     2022-04-12 00:55:12,547 [files_box.on_file_available:99]:All files available
INFO     2022-04-12 00:55:12,547 [installerwindow.on_files_available:463]:All files are available, continuing install
DEBUG    2022-04-12 00:55:12,549 [interpreter._iter_commands:317]:Installer command: {'task': {'arch': 'win64', 'name': 'create_prefix', 'prefix': '$GAMEDIR'}}
INFO     2022-04-12 00:55:12,551 [wine.create_prefix:96]:Creating a win64 prefix in /home/schenkel/Games/star-citizen
DEBUG    2022-04-12 00:55:12,552 [system.execute:56]:Executing /home/schenkel/.local/share/lutris/runners/wine/lutris-fshack-6.21-6-x86_64/bin/wineboot
DEBUG    2022-04-12 00:55:12,552 [system.execute:62]:WINEARCH=win64 WINEPREFIX=/home/schenkel/Games/star-citizen WINEDLLOVERRIDES=winemenubuilder= WINE_MONO_CACHE_DIR=/home/schenkel/.local/share/lutris/runners/wine/lutris-fshack-6.21-6-x86_64/mono WINE_GECKO_CACHE_DIR=/home/schenkel/.local/share/lutris/runners/wine/lutris-fshack-6.21-6-x86_64/gecko
INFO     2022-04-12 00:55:28,120 [wine.create_prefix:147]:win64 Prefix created in /home/schenkel/Games/star-citizen
DEBUG    2022-04-12 00:55:28,167 [interpreter._iter_commands:317]:Installer command: {'task': {'app': '--force arial vcrun2019 win10', 'arch': 'win64', 'name': 'winetricks', 'prefix': '$GAMEDIR'}}
DEBUG    2022-04-12 00:55:28,196 [wine.use_lutris_runtime:115]:/home/schenkel/.local/share/lutris/runners/wine/lutris-fshack-6.21-6-x86_64/bin/wine is provided by Lutris, using runtime
ERROR    2022-04-12 00:55:28,627 [jobs.target:36]:Error while completing task <bound method CommandsMixin.task of <interpreter.ScriptInterpreter object at 0x7f3335f9e240 (lutris+installer+interpreter+ScriptInterpreter at 0x22d6e20)>>: <class 'AttributeError'> 'NoneType' object has no attribute 'lower'
  File "/usr/lib64/python3.9/site-packages/lutris/util/jobs.py", line 34, in target
    result = self.function(*args, **kwargs)
  File "/usr/lib64/python3.9/site-packages/lutris/installer/commands.py", line 436, in task
    command = task(**data)
  File "/usr/lib64/python3.9/site-packages/lutris/runners/commands/wine.py", line 346, in winetricks
    return wineexec(
  File "/usr/lib64/python3.9/site-packages/lutris/runners/commands/wine.py", line 299, in wineexec
    wine.prelaunch()
  File "/usr/lib64/python3.9/site-packages/lutris/runners/wine.py", line 799, in prelaunch
    self.setup_dlls(
  File "/usr/lib64/python3.9/site-packages/lutris/runners/wine.py", line 776, in setup_dlls
    if dll_manager.version.lower() != "manual":
ERROR    2022-04-12 00:55:28,628 [interpreter._iter_commands:302]:Last install command failed, show error
```


### System Information

```shell
[System]
OS:              Slackware 15.0 current
Arch:            x86_64
Kernel:          5.17.2
Desktop:         KDE
Display Server:  x11

[CPU]
Vendor:          GenuineIntel
Model:           Intel(R) Core(TM) i7-5820K CPU @ 3.30GHz
Physical cores:  6
Logical cores:   12

[Memory]
RAM:             31.3 GB
Swap:            16.0 GB

[Graphics]
Vendor:          AMD
OpenGL Renderer: AMD Radeon RX 6800 XT (SIENNA_CICHLID, DRM 3.44.0, 5.17.2, LLVM 13.0.1)
OpenGL Version:  4.6 (Compatibility Profile) Mesa 21.3.8
OpenGL Core:     4.6 (Core Profile) Mesa 21.3.8
OpenGL ES:       OpenGL ES 3.2 Mesa 21.3.8
Vulkan:          Supported
```


### Media (optional)

_No response_

### Checklist:

- [X] I'm not asking for support with a game or the wine runner.
- [X] I have followed the above mentioned guides and have all the graphics and wine dependencies installed.
- [X] I have checked for existing issues that describe my problem prior to opening this one.
- [X] I understand that improperly formatted bug reports may be closed without explanation.


Discussion:
I had installed Star Citizen a month ago without problem, I don't know for sure what have happened. Before trying to reinstall, I have tried to launch it, it couldn't with version 5.9.1, then I upgrade it, was able to launch it, but the RSI Launcher was just showing a Blank Window, then I tried to reinstall just the launcher and I couldn't it. I also tried deleting the directories `.local/share/lutris` and the `.config/lutris` but the issue persists.

Resolving patch:
diff --git a/lutris/runners/wine.py b/lutris/runners/wine.py
--- a/lutris/runners/wine.py
+++ b/lutris/runners/wine.py
@@ -772,8 +772,10 @@ def setup_dlls(self, manager_class, enable, version):
             arch=self.wine_arch,
             version=version,
         )
+
         # manual version only sets the dlls to native
-        if dll_manager.version.lower() != "manual":
+        manager_version = dll_manager.version
+        if not manager_version or manager_version.lower() != "manual":
             if enable:
                 dll_manager.enable()
             else:


Test patch: