Bug 589520 - Meegotouch don't check and don't understand that amount of arguments can be 0! r=dougt
authorOleg Romashin <romaxa@gmail.com>
Tue, 24 Aug 2010 10:00:49 -0700
changeset 51361 ec2dd928604c94be628a7d0fa251247ede456f8a
parent 51360 146fcfa5fbcf6b5b1a68beba58b3624293eedb45
child 51362 090abc158c8ce764fd899c62539fa613947f9af3
push idunknown
push userunknown
push dateunknown
reviewersdougt
bugs589520
milestone2.0b5pre
Bug 589520 - Meegotouch don't check and don't understand that amount of arguments can be 0! r=dougt
toolkit/xre/nsQAppInstance.cpp
--- a/toolkit/xre/nsQAppInstance.cpp
+++ b/toolkit/xre/nsQAppInstance.cpp
@@ -50,16 +50,20 @@ int nsQAppInstance::sQAppRefCount = 0;
 void nsQAppInstance::AddRef(void) {
   if (qApp) return;
   if (!sQAppInstance) {
     const char *graphicsSystem = PR_GetEnv("MOZ_QT_GRAPHICSSYSTEM");
     if (graphicsSystem)
       QApplication::setGraphicsSystem(QString(graphicsSystem));
 #if (MOZ_PLATFORM_MAEMO == 6)
     QApplication::setStyle(QLatin1String("windows"));
+    if (!gArgc) {
+      gArgv[gArgc] = strdup("nsQAppInstance");
+      gArgc++;
+    }
 #endif
     sQAppInstance = new QApplication(gArgc, gArgv);
   }
   sQAppRefCount++;
 }
 
 void nsQAppInstance::Release(void) {
   if (sQAppInstance && !--sQAppRefCount) {