File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -31,9 +31,12 @@ EventDispenser::EventDispenser(const std::shared_ptr<GOptions>&
3131 neventsToProcess = gopt->getScalarInt (" n" );
3232
3333 // Detect offscreen mode once at construction so processEvents() needs no vis headers.
34- auto driverNode = gopt->getOptionMapInNode (" g4view" , " driver" );
35- if (!driverNode.IsNull () && driverNode.IsDefined ()) {
36- offscreen_screenshots = (driverNode.as <std::string>() == " TOOLSSG_OFFSCREEN" );
34+ // g4view is only defined when g4display options are included (e.g. in the full gemc app).
35+ if (gopt->doesOptionExist (" g4view" )) {
36+ auto driverNode = gopt->getOptionMapInNode (" g4view" , " driver" );
37+ if (!driverNode.IsNull () && driverNode.IsDefined ()) {
38+ offscreen_screenshots = (driverNode.as <std::string>() == " TOOLSSG_OFFSCREEN" );
39+ }
3740 }
3841
3942 // If there are no events to process, keep the object in an initialized-but-idle state.
You can’t perform that action at this time.
0 commit comments