From e540b66a8660ab2f3d3a9be153e8cf8aaa641714 Mon Sep 17 00:00:00 2001 From: Dr Scofield Date: Tue, 7 Apr 2009 16:53:41 +0000 Subject: From: Alan Webb <alan_webb@us.ibm.com> Fix null reference exception during close down of IRC module if the region was not actually initialized. --- .../OptionalModules/Avatar/Chat/IRCBridgeModule.cs | 10 +- .../OpenSim.32BitLaunch/OpenSim.32BitLaunch.csproj | 58 ---------- .../OpenSim.GridLaunch/OpenSim.GridLaunch.csproj | 126 --------------------- 3 files changed, 9 insertions(+), 185 deletions(-) delete mode 100644 OpenSim/Tools/OpenSim.32BitLaunch/OpenSim.32BitLaunch.csproj delete mode 100644 OpenSim/Tools/OpenSim.GridLaunch/OpenSim.GridLaunch.csproj diff --git a/OpenSim/Region/OptionalModules/Avatar/Chat/IRCBridgeModule.cs b/OpenSim/Region/OptionalModules/Avatar/Chat/IRCBridgeModule.cs index 0facc14..13874fa 100644 --- a/OpenSim/Region/OptionalModules/Avatar/Chat/IRCBridgeModule.cs +++ b/OpenSim/Region/OptionalModules/Avatar/Chat/IRCBridgeModule.cs @@ -148,8 +148,16 @@ namespace OpenSim.Region.OptionalModules.Avatar.Chat if (!enabled) return; + if (region == null) + return; + region.Close(); - lock (m_regions) m_regions.Remove(region); + + if(m_regions.Contains(region)) + { + lock (m_regions) m_regions.Remove(region); + } + } #endregion diff --git a/OpenSim/Tools/OpenSim.32BitLaunch/OpenSim.32BitLaunch.csproj b/OpenSim/Tools/OpenSim.32BitLaunch/OpenSim.32BitLaunch.csproj deleted file mode 100644 index d829e69..0000000 --- a/OpenSim/Tools/OpenSim.32BitLaunch/OpenSim.32BitLaunch.csproj +++ /dev/null @@ -1,58 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> - <PropertyGroup> - <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> - <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> - <ProductVersion>9.0.30729</ProductVersion> - <SchemaVersion>2.0</SchemaVersion> - <ProjectGuid>{595D67F3-B413-4A43-8568-5B5930E3B31D}</ProjectGuid> - <OutputType>Exe</OutputType> - <AppDesignerFolder>Properties</AppDesignerFolder> - <RootNamespace>OpenSim._32BitLaunch</RootNamespace> - <AssemblyName>OpenSim.32BitLaunch</AssemblyName> - <TargetFrameworkVersion>v2.0</TargetFrameworkVersion> - <FileAlignment>512</FileAlignment> - </PropertyGroup> - <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> - <DebugSymbols>true</DebugSymbols> - <DebugType>full</DebugType> - <Optimize>false</Optimize> - <OutputPath>..\..\..\bin\</OutputPath> - <DefineConstants>DEBUG;TRACE</DefineConstants> - <ErrorReport>prompt</ErrorReport> - <WarningLevel>4</WarningLevel> - <PlatformTarget>x86</PlatformTarget> - </PropertyGroup> - <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> - <DebugType>pdbonly</DebugType> - <Optimize>true</Optimize> - <OutputPath>bin\Release\</OutputPath> - <DefineConstants>TRACE</DefineConstants> - <ErrorReport>prompt</ErrorReport> - <WarningLevel>4</WarningLevel> - </PropertyGroup> - <ItemGroup> - <Reference Include="log4net, Version=1.2.10.0, Culture=neutral, PublicKeyToken=1b44e1d426115821, processorArchitecture=MSIL" /> - <Reference Include="System" /> - <Reference Include="System.Data" /> - <Reference Include="System.Xml" /> - </ItemGroup> - <ItemGroup> - <Compile Include="Program.cs" /> - <Compile Include="Properties\AssemblyInfo.cs" /> - </ItemGroup> - <ItemGroup> - <ProjectReference Include="..\..\Region\Application\OpenSim.csproj"> - <Project>{438A9556-0000-0000-0000-000000000000}</Project> - <Name>OpenSim</Name> - </ProjectReference> - </ItemGroup> - <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> - <!-- To modify your build process, add your task inside one of the targets below and uncomment it. - Other similar extension points exist, see Microsoft.Common.targets. - <Target Name="BeforeBuild"> - </Target> - <Target Name="AfterBuild"> - </Target> - --> -</Project> \ No newline at end of file diff --git a/OpenSim/Tools/OpenSim.GridLaunch/OpenSim.GridLaunch.csproj b/OpenSim/Tools/OpenSim.GridLaunch/OpenSim.GridLaunch.csproj deleted file mode 100644 index b262dd1..0000000 --- a/OpenSim/Tools/OpenSim.GridLaunch/OpenSim.GridLaunch.csproj +++ /dev/null @@ -1,126 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> - <PropertyGroup> - <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> - <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> - <ProductVersion>9.0.30729</ProductVersion> - <SchemaVersion>2.0</SchemaVersion> - <ProjectGuid>{595D67F3-B413-4A43-8568-5B5930E3B31D}</ProjectGuid> - <OutputType>Exe</OutputType> - <AppDesignerFolder>Properties</AppDesignerFolder> - <RootNamespace>OpenSim.GridLaunch</RootNamespace> - <AssemblyName>OpenSim.GridLaunch</AssemblyName> - <TargetFrameworkVersion>v2.0</TargetFrameworkVersion> - <FileAlignment>512</FileAlignment> - </PropertyGroup> - <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> - <DebugSymbols>true</DebugSymbols> - <DebugType>full</DebugType> - <Optimize>false</Optimize> - <OutputPath>..\..\..\bin\</OutputPath> - <DefineConstants>DEBUG;TRACE</DefineConstants> - <ErrorReport>prompt</ErrorReport> - <WarningLevel>4</WarningLevel> - <PlatformTarget>x86</PlatformTarget> - </PropertyGroup> - <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> - <DebugType>pdbonly</DebugType> - <Optimize>true</Optimize> - <OutputPath>bin\Release\</OutputPath> - <DefineConstants>TRACE</DefineConstants> - <ErrorReport>prompt</ErrorReport> - <WarningLevel>4</WarningLevel> - </PropertyGroup> - <ItemGroup> - <Reference Include="log4net, Version=1.2.10.0, Culture=neutral, PublicKeyToken=1b44e1d426115821, processorArchitecture=MSIL" /> - <Reference Include="System" /> - <Reference Include="System.Data" /> - <Reference Include="System.Drawing" /> - <Reference Include="System.ServiceProcess" /> - <Reference Include="System.Windows.Forms" /> - <Reference Include="System.Xml" /> - </ItemGroup> - <ItemGroup> - <Compile Include="AppExecutor.cs" /> - <Compile Include="AppExecutor_AsyncIO.cs" /> - <Compile Include="AppExecutor_Thread.cs" /> - <Compile Include="CommandProcessor.cs" /> - <Compile Include="GUI\Console\Console.cs" /> - <Compile Include="GUI\IGUI.cs" /> - <Compile Include="GUI\Network\Client.cs" /> - <Compile Include="GUI\Network\TCPD.cs" /> - <Compile Include="GUI\Service\Service.cs"> - <SubType>Component</SubType> - </Compile> - <Compile Include="GUI\WinForm\ProcessPanel.cs"> - <SubType>Form</SubType> - </Compile> - <Compile Include="GUI\WinForm\ProcessPanel.Designer.cs"> - <DependentUpon>ProcessPanel.cs</DependentUpon> - </Compile> - <Compile Include="GUI\WinForm\ucAppWindow.cs"> - <SubType>UserControl</SubType> - </Compile> - <Compile Include="GUI\WinForm\ucAppWindow.Designer.cs"> - <DependentUpon>ucAppWindow.cs</DependentUpon> - </Compile> - <Compile Include="GUI\WinForm\ucInputField.cs"> - <SubType>UserControl</SubType> - </Compile> - <Compile Include="GUI\WinForm\ucInputField.Designer.cs"> - <DependentUpon>ucInputField.cs</DependentUpon> - </Compile> - <Compile Include="GUI\WinForm\ucLogWindow.cs"> - <SubType>UserControl</SubType> - </Compile> - <Compile Include="GUI\WinForm\ucLogWindow.Designer.cs"> - <DependentUpon>ucLogWindow.cs</DependentUpon> - </Compile> - <Compile Include="log4netAppender.cs" /> - <Compile Include="Program.cs" /> - <Compile Include="Properties\AssemblyInfo.cs" /> - <Compile Include="Properties\Resources.Designer.cs"> - <AutoGen>True</AutoGen> - <DesignTime>True</DesignTime> - <DependentUpon>Resources.resx</DependentUpon> - </Compile> - <Compile Include="Settings.cs" /> - </ItemGroup> - <ItemGroup> - <EmbeddedResource Include="GUI\WinForm\ProcessPanel.resx"> - <DependentUpon>ProcessPanel.cs</DependentUpon> - </EmbeddedResource> - <EmbeddedResource Include="GUI\WinForm\ucAppWindow.resx"> - <DependentUpon>ucAppWindow.cs</DependentUpon> - </EmbeddedResource> - <EmbeddedResource Include="GUI\WinForm\ucInputField.resx"> - <DependentUpon>ucInputField.cs</DependentUpon> - </EmbeddedResource> - <EmbeddedResource Include="GUI\WinForm\ucLogWindow.resx"> - <DependentUpon>ucLogWindow.cs</DependentUpon> - </EmbeddedResource> - </ItemGroup> - <ItemGroup> - <None Include="App.config" /> - </ItemGroup> - <ItemGroup> - <Content Include="GUI\WinForm\OpenSim Bottom Border.png" /> - <Content Include="GUI\WinForm\OpenSim Right Border.png" /> - <Content Include="GUI\WinForm\OpenSim.png" /> - <None Include="OpenSim.GridLaunch.ini"> - <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> - </None> - <EmbeddedResource Include="Properties\Resources.resx"> - <Generator>ResXFileCodeGenerator</Generator> - <LastGenOutput>Resources.Designer.cs</LastGenOutput> - </EmbeddedResource> - </ItemGroup> - <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> - <!-- To modify your build process, add your task inside one of the targets below and uncomment it. - Other similar extension points exist, see Microsoft.Common.targets. - <Target Name="BeforeBuild"> - </Target> - <Target Name="AfterBuild"> - </Target> - --> -</Project> \ No newline at end of file -- cgit v1.1