Browse Source

Fix ScopeGuard move behavior

nordsoft 2 years ago
parent
commit
91ef7cbb4f
1 changed files with 2 additions and 1 deletions
  1. 2 1
      lib/ScopeGuard.h

+ 2 - 1
lib/ScopeGuard.h

@@ -37,7 +37,8 @@ namespace vstd
 		{}
 		~ScopeGuard()
 		{
-			f();
+			if(fire)
+				f();
 		}
 	};