diff options
| author | Carl Hetherington <cth@carlh.net> | 2025-11-02 21:29:05 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2026-02-16 01:19:49 +0100 |
| commit | 1a9486423cceb4bb5934285bf1ddf96771e891b5 (patch) | |
| tree | 44de4c09bd6a929a64cf9356f10b55d8fc01cb3c /src/wx | |
| parent | 97dc9f9e9c1b6cbff63bed64ceb9d5a78d868f8b (diff) | |
Fix null pointer dereference if DCPOMATIC_GRAPHICS is unset and resources_path() doesn't exist.
Diffstat (limited to 'src/wx')
| -rw-r--r-- | src/wx/wx_util.cc | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/wx/wx_util.cc b/src/wx/wx_util.cc index 8d21a3e63..71f5c092d 100644 --- a/src/wx/wx_util.cc +++ b/src/wx/wx_util.cc @@ -629,15 +629,14 @@ bitmap_path (string name) #ifdef DCPOMATIC_DEBUG /* Hack to allow Linux and OS X to find icons when running from the source tree */ - char* path = getenv ("DCPOMATIC_GRAPHICS"); - if (path) { + if (char* path = getenv("DCPOMATIC_GRAPHICS")) { base = path; } else { base = resources_path(); } if (!dcp::filesystem::exists(base / name)) { - base = path / boost::filesystem::path("osx/preferences"); + base /= boost::filesystem::path("osx/preferences"); } #else base = resources_path(); |
