Browse Source

dialog(k): safety check for lookup in dialog table at shutdown
(cherry picked from commit 017ea5779710223df8f5a28829f77eff8395affc)

Daniel-Constantin Mierla 14 năm trước cách đây
mục cha
commit
b018f09abb
1 tập tin đã thay đổi với 3 bổ sung0 xóa
  1. 3 0
      modules_k/dialog/dlg_hash.c

+ 3 - 0
modules_k/dialog/dlg_hash.c

@@ -444,6 +444,9 @@ dlg_cell_t *dlg_lookup( unsigned int h_entry, unsigned int h_id)
 	dlg_cell_t *dlg;
 	dlg_entry_t *d_entry;
 
+	if(d_table==NULL)
+		return 0;
+
 	if (h_entry>=d_table->size)
 		goto not_found;