Fix: TextfileWindow called virtual methods before constructor completed. (#11889)
SetStringParameters() was called during widget tree init in the constructor.
Calls within a constructor cannot call the derived classes methods. This would result in invalid data being passed to the string system, which could then crash.
(cherry picked from commit fef0bfcfd3)
			
			
This commit is contained in:
		 Peter Nelson
					Peter Nelson
				
			
				
					committed by
					
						 Jonathan G Rennison
						Jonathan G Rennison
					
				
			
			
				
	
			
			
			 Jonathan G Rennison
						Jonathan G Rennison
					
				
			
						parent
						
							a7c2f489f6
						
					
				
				
					commit
					4bf9c123d3
				
			| @@ -44,6 +44,8 @@ struct ContentTextfileWindow : public TextfileWindow { | ||||
|  | ||||
| 	ContentTextfileWindow(TextfileType file_type, const ContentInfo *ci) : TextfileWindow(file_type), ci(ci) | ||||
| 	{ | ||||
| 		this->ConstructWindow(); | ||||
|  | ||||
| 		const char *textfile = this->ci->GetTextfile(file_type); | ||||
| 		this->LoadTextfile(textfile, GetContentInfoSubDir(this->ci->type)); | ||||
| 	} | ||||
|   | ||||
		Reference in New Issue
	
	Block a user