diff --git a/sakura_core/cmd/CViewCommander_Window.cpp b/sakura_core/cmd/CViewCommander_Window.cpp index db3b6dca80..c21d446ad9 100644 --- a/sakura_core/cmd/CViewCommander_Window.cpp +++ b/sakura_core/cmd/CViewCommander_Window.cpp @@ -296,6 +296,11 @@ void CViewCommander::Command_TILE_V( void ) // To Here Jul. 28, 2002 genta count++; } + if( count == 0 ){ + delete[] phwndArr; + delete[] pEditNodeArr; + return; + } int height = (rcDesktop.bottom - rcDesktop.top ) / count; for(i = 0; i < count; ++i ){ // Jul. 21, 2002 genta @@ -350,6 +355,11 @@ void CViewCommander::Command_TILE_H( void ) // To Here Jul. 28, 2002 genta count++; } + if (count == 0) { + delete[] phwndArr; + delete[] pEditNodeArr; + return; + } int width = (rcDesktop.right - rcDesktop.left ) / count; for(i = 0; i < count; ++i ){ // Jul. 21, 2002 genta