mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 12:37:44 +00:00
LibJS: Allow JS::make_handle(T*) to be called with nullptr
Instead of asserting, just return an empty Handle.
This commit is contained in:
parent
d98f12b928
commit
7047a5ca59
1 changed files with 2 additions and 0 deletions
|
@ -70,6 +70,8 @@ private:
|
|||
template<class T>
|
||||
inline Handle<T> make_handle(T* cell)
|
||||
{
|
||||
if (!cell)
|
||||
return Handle<T> {};
|
||||
return Handle<T>::create(cell);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue