Skip to content

Commit 5a6fafc

Browse files
committed
[SYCL]Check if loadPlugin returns a nullptr.
Signed-off-by: Garima Gupta <[email protected]>
1 parent 96de11d commit 5a6fafc

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

sycl/source/detail/pi.cpp

Lines changed: 7 additions & 3 deletions
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)