forked from bartvdbraak/blender
- closing the user prefs accessed the temp screen after removing it.
- colorband drawing could use un-initialized vars (probably wouldnt crash)
This commit is contained in:
parent
fb4f78513e
commit
266271d65a
@ -698,7 +698,7 @@ void ui_draw_but_COLORBAND(uiBut *but, uiWidgetColors *wcol, rcti *rect)
|
|||||||
float x1, y1, sizex, sizey;
|
float x1, y1, sizex, sizey;
|
||||||
float dx, v3[2], v1[2], v2[2], v1a[2], v2a[2];
|
float dx, v3[2], v1[2], v2[2], v1a[2], v2a[2];
|
||||||
int a;
|
int a;
|
||||||
float pos, colf[4];
|
float pos, colf[4]= {0,0,0,0}; /* initialize incase the colorband isnt valid */
|
||||||
|
|
||||||
coba= (ColorBand *)(but->editcoba? but->editcoba: but->poin);
|
coba= (ColorBand *)(but->editcoba? but->editcoba: but->poin);
|
||||||
if(coba==NULL) return;
|
if(coba==NULL) return;
|
||||||
|
@ -1124,13 +1124,14 @@ void ED_screen_exit(bContext *C, wmWindow *window, bScreen *screen)
|
|||||||
/* mark it available for use for other windows */
|
/* mark it available for use for other windows */
|
||||||
screen->winid= 0;
|
screen->winid= 0;
|
||||||
|
|
||||||
|
/* before deleting the temp screen or we get invalid access */
|
||||||
|
CTX_wm_window_set(C, prevwin);
|
||||||
|
|
||||||
/* if temp screen, delete it */
|
/* if temp screen, delete it */
|
||||||
if(screen->full == SCREENTEMP) {
|
if(screen->full == SCREENTEMP) {
|
||||||
Main *bmain= CTX_data_main(C);
|
Main *bmain= CTX_data_main(C);
|
||||||
free_libblock(&bmain->screen, screen);
|
free_libblock(&bmain->screen, screen);
|
||||||
}
|
}
|
||||||
|
|
||||||
CTX_wm_window_set(C, prevwin);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* *********************************** */
|
/* *********************************** */
|
||||||
|
Loading…
Reference in New Issue
Block a user