shithub: choc

Download patch

ref: e558fa3f2dd21d2870520c2449020ec7d5f3ca57
parent: ef8bdb1feae078684843ae8ed3af0c632cc5eda0
author: Simon Howard <[email protected]>
date: Mon Sep 18 18:19:30 EDT 2006

Fix TXT_SelectWidgets with NULL spacers.

Subversion-branch: /trunk/chocolate-doom
Subversion-revision: 615

--- a/textscreen/txt_table.c
+++ b/textscreen/txt_table.c
@@ -577,6 +577,11 @@
 
     for (i=0; i<table->num_widgets; ++i)
     {
+        if (table->widgets[i] == NULL)
+        {
+            continue;
+        }
+        
         if (table->widgets[i] == widget)
         {
             // Found the item!  Select it and return.