skypjack 9 месяцев назад
Родитель
Сommit
2f5b25b189
1 измененных файлов с 2 добавлено и 2 удалено
  1. 2 2
      src/entt/process/process.hpp

+ 2 - 2
src/entt/process/process.hpp

@@ -140,14 +140,14 @@ public:
 
 
     /*! @brief Stops a process if it's running, otherwise does nothing. */
     /*! @brief Stops a process if it's running, otherwise does nothing. */
     void pause() noexcept {
     void pause() noexcept {
-        if(current == state::running) {
+        if(alive()) {
             current = state::paused;
             current = state::paused;
         }
         }
     }
     }
 
 
     /*! @brief Restarts a process if it's paused, otherwise does nothing. */
     /*! @brief Restarts a process if it's paused, otherwise does nothing. */
     void unpause() noexcept {
     void unpause() noexcept {
-        if(current == state::paused) {
+        if(alive()) {
             current = state::running;
             current = state::running;
         }
         }
     }
     }