Răsfoiți Sursa

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

Daniel-Constantin Mierla 14 ani în urmă
părinte
comite
3c1b71be01
1 a modificat fișierele cu 4 adăugiri și 0 ștergeri
  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);