Browse Source

Merge pull request #1853 from Nordsoft91/fix-scope-guard

Fix ScopeGuard move behavior
Ivan Savenko 2 years ago
parent
commit
c5ca17a324
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();
 		}
 	};