mothra: fix nil pointer crash

This commit is contained in:
cinap_lenrek 2011-10-05 04:48:31 +02:00
parent 51c7856350
commit 2fdb279101

View file

@ -137,6 +137,7 @@ void adjkb(void){
Rtext *t;
int yoffs;
extern Panel *pl_kbfocus; /* this is a secret panel library name */
if(current){
yoffs=text->r.min.y-plgetpostextview(text);
for(t=current->text;t;t=t->next) if(!eqrect(t->r, Rect(0,0,0,0))){
if(t->r.max.y+yoffs>text->r.max.y) break;
@ -144,6 +145,7 @@ void adjkb(void){
&& t->b==0
&& subpanel(t->p, pl_kbfocus)) return;
}
}
plgrabkb(cmd);
}