Parcourir la source

dialog: don't add dialog profiles when loading from db and state is terminated

Daniel-Constantin Mierla il y a 11 ans
Parent
commit
9b88eb7ee2
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  1. 1 1
      modules/dialog/dlg_db_handler.c

+ 1 - 1
modules/dialog/dlg_db_handler.c

@@ -414,7 +414,7 @@ static int load_dialog_info_from_db(int dlg_hash_size, int fetch_num_rows)
 			dlg_set_toroute(dlg, &toroute_name);
 
 			GET_STR_VALUE(xdata, values, 21, 0, 0);
-			if(xdata.s!=NULL)
+			if(xdata.s!=NULL && dlg->state!=DLG_STATE_DELETED)
 			{
 				srjson_InitDoc(&jdoc, NULL);
 				jdoc.buf = xdata;