]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/containr.cpp
made wxTextFile work in Unicode; also made it possible to use it with non seekable...
[wxWidgets.git] / src / common / containr.cpp
index 55b6109a9b29e768fc260c092c7c319338b2b124..185f8098d9f3430adf14a3fa374c75e95fda34bb 100644 (file)
@@ -369,12 +369,18 @@ void wxControlContainer::HandleOnNavigationKey( wxNavigationKeyEvent& event )
     for ( ;; )
     {
         // don't go into infinite loop
-        if ( start_node && node == start_node )
+        if ( start_node && node && node == start_node )
             break;
 
         // Have we come to the last or first item on the panel?
         if ( !node )
         {
+            if ( !start_node )
+            {
+                // exit now as otherwise we'd loop forever
+                break;
+            }
+
             if ( !goingDown )
             {
                 // Check if our (maybe grand) parent is another panel: if this