IWDG & WWDG : Sensor Checking

HAL_WWDG_Refresh(&hwwdg);   // refresh WWDG
HAL_IWDG_Refresh(&hiwdg);  // refresh IWDG Counter
#include "ssd1306.h"
#include "ds18b20.h"
  uint8_t temp;
  char display[16]; 
  init_OLED();
  clear_display();
  OLCD_write_string(0,0,"iotthinghub.com");
  OLCD_write_string(2,0,"Connecting Sen..");
  HAL_Delay(1000);
  MX_IWDG_Init();
while (1)
  {
      temp=DS18B20ReadTemp();
      if(temp) HAL_IWDG_Refresh(&hiwdg);
      else OLCD_write_string(2,0,"Sensor Missing.."); //This line will not execute
      if(temp) sprintf(display,"Tem:%.4f C   ",temperature);
      OLCD_write_string(2,0,display);
  }