Commits

Adrian Buehlmann  committed 8870759

shellext: check return value of CreateFileA call

  • Participants
  • Parent commits baef140

Comments (0)

Files changed (1)

File win32/shellext/ContextMenu.cpp

             FILE_SHARE_READ, &sa, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, 0
         );
 
+        if (tempfileHandle == INVALID_HANDLE_VALUE)
+        {
+            TDEBUG_TRACE("DoHgtk: error: failed to create file " << tempfile);
+            return;
+        }
+
         typedef std::vector<std::string>::size_type ST;
         for (ST i = 0; i < myFiles.size(); i++)
         {