Author: hdu
Date: Fri Feb  7 14:29:20 2014
New Revision: 1565664

URL: http://svn.apache.org/r1565664
Log:
#i124201# fix frame-list handling with AppleRemote events

iterating beyond the end of a frame-list must be avoided

Modified:
    openoffice/trunk/main/vcl/aqua/source/app/salinst.cxx

Modified: openoffice/trunk/main/vcl/aqua/source/app/salinst.cxx
URL: 
http://svn.apache.org/viewvc/openoffice/trunk/main/vcl/aqua/source/app/salinst.cxx?rev=1565664&r1=1565663&r2=1565664&view=diff
==============================================================================
--- openoffice/trunk/main/vcl/aqua/source/app/salinst.cxx (original)
+++ openoffice/trunk/main/vcl/aqua/source/app/salinst.cxx Fri Feb  7 14:29:20 
2014
@@ -622,11 +622,10 @@ void AquaSalInstance::handleAppDefinedEv
         bool bIsFullScreenMode = false;
 
         std::list<AquaSalFrame*>::iterator it = pSalData->maFrames.begin();
-        while( (*it) &&  ( (it != pSalData->maFrames.end() ) || ( 
(*it)->mbFullScreen == false ) ) )
+        for(; it != pSalData->maFrames.end(); ++it )
         {
             if( (*it)->mbFullScreen )
                 bIsFullScreenMode = true;
-            it++;
         }
 
         switch ([pEvent data1]) 
@@ -663,7 +662,7 @@ void AquaSalInstance::handleAppDefinedEv
                 break;
         }
         AquaSalFrame* pFrame = pSalData->maFrames.front();
-        Window * pWindow = pFrame->GetWindow() ? 
pSalData->maFrames.front()->GetWindow() : NULL;
+        Window* pWindow = pFrame ? pFrame->GetWindow() : NULL;
 
         if( pWindow )
         {


Reply via email to