瀏覽代碼

dialog(k): reset global dlg shortcut when destroying the structure

Daniel-Constantin Mierla 14 年之前
父節點
當前提交
3c1b71be01
共有 1 個文件被更改,包括 4 次插入0 次删除
  1. 4 0
      modules_k/dialog/dlg_hash.c

+ 4 - 0
modules_k/dialog/dlg_hash.c

@@ -200,6 +200,10 @@ inline void destroy_dlg(struct dlg_cell *dlg)
 	run_dlg_callbacks( DLGCB_DESTROY , dlg, NULL, NULL, DLG_DIR_NONE, 0);
 	run_dlg_callbacks( DLGCB_DESTROY , dlg, NULL, NULL, DLG_DIR_NONE, 0);
 
 
 
 
+	/* reset the global shortcut, if it is the case */
+	if(current_dlg_pointer == dlg)
+		current_dlg_pointer = NULL;
+
 	/* delete the dialog from DB*/
 	/* delete the dialog from DB*/
 	if (dlg_db_mode)
 	if (dlg_db_mode)
 		remove_dialog_from_db(dlg);
 		remove_dialog_from_db(dlg);