Author: gs Date: Thu May 15 14:02:59 2008 New Revision: 47573 URL: http://svn.opensuse.org/viewcvs/yast?rev=47573&view=rev Log: additionally check for empty tree in setpos() and handleInput() Modified: trunk/ncurses/src/NCTreePad.cc Modified: trunk/ncurses/src/NCTreePad.cc URL: http://svn.opensuse.org/viewcvs/yast/trunk/ncurses/src/NCTreePad.cc?rev=47573&r1=47572&r2=47573&view=diff ============================================================================== --- trunk/ncurses/src/NCTreePad.cc (original) +++ trunk/ncurses/src/NCTreePad.cc Thu May 15 14:02:59 2008 @@ -268,7 +268,13 @@ if ( citem.L != oitem ) { unsigned at = 0; - unsigned len = visItems[citem.L]->Hotspot( at ); + unsigned len = 0; + + if ( citem.L >= 0 && visItems[citem.L] ) + len = visItems[citem.L]->Hotspot( at ); + else + return ERR; + if ( len ) { if ( (int)at < srect.Pos.C ) { srect.Pos.C = at; @@ -310,6 +316,9 @@ { bool handled = true; + if ( !GetCurrentLine() ) + return false; + switch ( key ) { case KEY_UP: case KEY_PPAGE: -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org