浏览代码

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

Daniel-Constantin Mierla 14 年之前
父节点
当前提交
b018f09abb
共有 1 个文件被更改,包括 3 次插入0 次删除
  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;