diff --git a/Common/GmshMessage.cpp b/Common/GmshMessage.cpp
index 5bd3397a415b37332beea489816d6351d6fdc0cb..ef5dabf5f2f800af0558f745f60c0771d67d47d6 100644
--- a/Common/GmshMessage.cpp
+++ b/Common/GmshMessage.cpp
@@ -95,11 +95,11 @@ void Msg::Init(int argc, char **argv)
       sargv[sargc++] = argv[i];
   }
   PetscInitialize(&sargc, &sargv, PETSC_NULL, PETSC_NULL);
-  delete [] sargv;
   PetscPopSignalHandler();
-#endif
 #if defined(HAVE_SLEPC)
   SlepcInitialize(&sargc, &sargv, PETSC_NULL, PETSC_NULL);
+#endif
+  delete [] sargv;
 #endif
   time_t now;
   time(&now);