Fix T38516: crash when using color picker from redo panel.
This commit is contained in:
		@@ -2299,7 +2299,7 @@ uiBlock *uiBeginBlock(const bContext *C, ARegion *region, const char *name, shor
 | 
			
		||||
		 * would slow down redraw, so only lookup for actual transform when it's indeed
 | 
			
		||||
		 * needed
 | 
			
		||||
		 */
 | 
			
		||||
		block->display_device = scn->display_settings.display_device;
 | 
			
		||||
		BLI_strncpy(block->display_device, scn->display_settings.display_device, sizeof(block->display_device));
 | 
			
		||||
 | 
			
		||||
		/* copy to avoid crash when scene gets deleted with ui still open */
 | 
			
		||||
		block->unit = MEM_mallocN(sizeof(scn->unit), "UI UnitSettings");
 | 
			
		||||
 
 | 
			
		||||
@@ -350,9 +350,9 @@ struct uiBlock {
 | 
			
		||||
 | 
			
		||||
	bool color_profile;         /* color profile for correcting linear colors for display */
 | 
			
		||||
 | 
			
		||||
	const char *display_device; /* display device name used to display this block,
 | 
			
		||||
	                             * used by color widgets to transform colors from/to scene linear
 | 
			
		||||
	                             */
 | 
			
		||||
	char display_device[64]; /* display device name used to display this block,
 | 
			
		||||
	                          * used by color widgets to transform colors from/to scene linear
 | 
			
		||||
	                          */
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
typedef struct uiSafetyRct {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user