projects
/
dcpomatic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
ae486fe
)
Check for errors when calling the GPU lister.
author
Carl Hetherington
<cth@carlh.net>
Sun, 24 Sep 2023 14:39:27 +0000
(16:39 +0200)
committer
Carl Hetherington
<cth@carlh.net>
Sat, 16 Dec 2023 01:07:38 +0000
(
02:07
+0100)
src/wx/grok/gpu_config_panel.h
patch
|
blob
|
history
diff --git
a/src/wx/grok/gpu_config_panel.h
b/src/wx/grok/gpu_config_panel.h
index 1478434be01188699fa1f0cbe3418d27d927a9c2..2647c1ece60d166c83d0928faa59caaab5d5ba46 100644
(file)
--- a/
src/wx/grok/gpu_config_panel.h
+++ b/
src/wx/grok/gpu_config_panel.h
@@
-3,7
+3,9
@@
static std::vector<std::string> get_gpu_names(std::string binary, std::string filename)
{
// Execute the GPU listing program and redirect its output to a file
static std::vector<std::string> get_gpu_names(std::string binary, std::string filename)
{
// Execute the GPU listing program and redirect its output to a file
- std::system((binary + " > " + filename).c_str());
+ if (std::system((binary + " > " + filename).c_str()) < 0) {
+ return {};
+ }
std::vector<std::string> gpu_names;
std::ifstream file(filename);
std::vector<std::string> gpu_names;
std::ifstream file(filename);