[Fix] Attempting to kill some seg faults.
This commit is contained in:
		
							parent
							
								
									d9c0459f4b
								
							
						
					
					
						commit
						1ef8cbfe44
					
				| @ -72,7 +72,7 @@ void hook_rm(int id) { | |||||||
|   if(m == (hook_nstack-1)) return; |   if(m == (hook_nstack-1)) return; | ||||||
| 
 | 
 | ||||||
|   // Move it!
 |   // Move it!
 | ||||||
|   memmove(&hook_stack[m+1], &hook_stack[m+2], hook_nstack-(m+1)); |   memmove(&hook_stack[m+1], &hook_stack[m+2], sizeof(Hook)*(hook_nstack-(m+2))); | ||||||
|   hook_nstack--; |   hook_nstack--; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -573,9 +573,10 @@ void window_destroyWidget(unsigned int wid, const char* wgtname) { | |||||||
|   widget_cleanup(&w->widgets[i]); |   widget_cleanup(&w->widgets[i]); | ||||||
|   if(i < w->nwidgets-1) |   if(i < w->nwidgets-1) | ||||||
|     // This isn't the last widget.
 |     // This isn't the last widget.
 | ||||||
|     w->widgets[i] = w->widgets[i-1]; |     memmove(&w->widgets[i], &w->widgets[i+1], | ||||||
|  |         sizeof(Widget) * (w->nwidgets-i-1)); | ||||||
| 
 | 
 | ||||||
|   w->nwidgets--; // Not that we don't actually realloc the space..
 |   (w->nwidgets)--; // Not that we don't actually realloc the space..
 | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| static void toolkit_drawOutline(double x, double y, double w, double h, | static void toolkit_drawOutline(double x, double y, double w, double h, | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 Allanis
						Allanis