Browse code

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

Daniel-Constantin Mierla authored on 04/10/2011 20:34:35
Showing 1 changed files
... ...
@@ -200,6 +200,10 @@ inline void destroy_dlg(struct dlg_cell *dlg)
200 200
 	run_dlg_callbacks( DLGCB_DESTROY , dlg, NULL, NULL, DLG_DIR_NONE, 0);
201 201
 
202 202
 
203
+	/* reset the global shortcut, if it is the case */
204
+	if(current_dlg_pointer == dlg)
205
+		current_dlg_pointer = NULL;
206
+
203 207
 	/* delete the dialog from DB*/
204 208
 	if (dlg_db_mode)
205 209
 		remove_dialog_from_db(dlg);