소스 검색

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);
 
 
+	/* reset the global shortcut, if it is the case */
+	if(current_dlg_pointer == dlg)
+		current_dlg_pointer = NULL;
+
 	/* delete the dialog from DB*/
 	if (dlg_db_mode)
 		remove_dialog_from_db(dlg);