Skip to content

Commit d15de0b

Browse files
authored
[SYCL] Check if loadPlugin returns a nullptr (#1411)
Signed-off-by: Garima Gupta <[email protected]>
1 parent d85acb7 commit d15de0b

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

sycl/source/detail/pi.cpp

+7-3
Original file line numberDiff line numberDiff line change
@@ -217,9 +217,13 @@ vector_class<plugin> initialize() {
217217
PiPlugin PluginInformation; // TODO: include.
218218
for (unsigned int I = 0; I < PluginNames.size(); I++) {
219219
void *Library = loadPlugin(PluginNames[I]);
220-
if (!Library && EnableTrace) {
221-
std::cerr << "Check if plugin is present. Failed to load plugin: "
222-
<< PluginNames[I] << std::endl;
220+
221+
if (!Library) {
222+
if (EnableTrace) {
223+
std::cerr << "Check if plugin is present. Failed to load plugin: "
224+
<< PluginNames[I] << std::endl;
225+
}
226+
continue;
223227
}
224228

225229
if (!bindPlugin(Library, &PluginInformation) && EnableTrace) {

0 commit comments

Comments
 (0)