Skip to content

Commit

Permalink
Fix 887
Browse files Browse the repository at this point in the history
Return hipInitializationError if backend was already destroyed
  • Loading branch information
pvelesko committed Jul 23, 2024
1 parent 1f94cd5 commit a9ee96a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/CHIPDriver.cc
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,9 @@ void CHIPInitializeCallOnce() {

extern void CHIPInitialize() {
std::call_once(Initialized, &CHIPInitializeCallOnce);
if (!Backend)

Check warning on line 128 in src/CHIPDriver.cc

View workflow job for this annotation

GitHub Actions / cpp-linter

src/CHIPDriver.cc:128:8 [readability-implicit-bool-conversion]

implicit conversion 'chipstar::Backend *' -> bool

Check warning on line 128 in src/CHIPDriver.cc

View workflow job for this annotation

GitHub Actions / cpp-linter

src/CHIPDriver.cc:128:16 [readability-braces-around-statements]

statement should be inside braces
CHIPERR_LOG_AND_THROW("Backend not initialized",
hipErrorInitializationError);
}

void CHIPUninitializeCallOnce() {
Expand Down

0 comments on commit a9ee96a

Please sign in to comment.