Check for null when converting Wrappable
This commit is contained in:
		
					parent
					
						
							
								cad1fa50a9
							
						
					
				
			
			
				commit
				
					
						cc4e2fcd94
					
				
			
		
					 1 changed files with 4 additions and 1 deletions
				
			
		|  | @ -89,7 +89,10 @@ template<typename T> | |||
| struct Converter<T*, typename enable_if< | ||||
|                        is_convertible<T*, Wrappable*>::value>::type> { | ||||
|   static v8::Local<v8::Value> ToV8(v8::Isolate* isolate, T* val) { | ||||
|     if (val) | ||||
|       return val->GetWrapper(isolate); | ||||
|     else | ||||
|       return v8::Null(isolate); | ||||
|   } | ||||
| 
 | ||||
|   static bool FromV8(v8::Isolate* isolate, v8::Local<v8::Value> val, T** out) { | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Cheng Zhao
				Cheng Zhao