mirror of
				https://github.com/godotengine/godot.git
				synced 2025-10-31 05:31:01 +00:00 
			
		
		
		
	Fix "!script_data is true" when updating placeholder scripts for GDNative libraries
Co-authored-by: geekrelief <geekrelief@gmail.com>
This commit is contained in:
		
							parent
							
								
									8a6763cf74
								
							
						
					
					
						commit
						1af4ba04cd
					
				
					 1 changed files with 9 additions and 0 deletions
				
			
		|  | @ -1757,6 +1757,15 @@ void NativeReloadNode::_notification(int p_what) { | |||
| 				} | ||||
| 
 | ||||
| 				for (Map<String, Set<NativeScript *>>::Element *U = NSL->library_script_users.front(); U; U = U->next()) { | ||||
| 					// Multiple GDNative libraries may be reloaded. The library and script
 | ||||
| 					// path should match to prevent failing `NSL->library_classes` lookup
 | ||||
| 					// from `get_script_desc()` in `script->_update_placeholder` below.
 | ||||
| 					// This check also prevents "!script_data is true" error from occuring
 | ||||
| 					// when e. g. re-focusing editor window.
 | ||||
| 					if (L->key() != U->key()) { | ||||
| 						continue; | ||||
| 					} | ||||
| 
 | ||||
| 					for (Set<NativeScript *>::Element *S = U->get().front(); S; S = S->next()) { | ||||
| 						NativeScript *script = S->get(); | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Andrew Dunai
						Andrew Dunai