Skip to content

Commit 02900e1

Browse files
committed
guard
Signed-off-by: Chris Perkins <[email protected]>
1 parent 81f1835 commit 02900e1

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

sycl/source/queue.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,9 @@ queue::queue(cl_command_queue clQueue, const context &SyclContext,
106106
}
107107

108108
queue::~queue() {
109-
impl->throw_asynchronous(); // <-- this should be safe in a noexcept context.
109+
if(impl){
110+
impl->throw_asynchronous(); // <-- this should be safe in a noexcept context.
111+
}
110112
}
111113

112114
cl_command_queue queue::get() const { return impl->get(); }

0 commit comments

Comments
 (0)