- Fix segfault on exit [1]

- Fix license

PR:		212866 [1]
Submitted by:	kdrakehp@zoho.com [1]
This commit is contained in:
Dmitry Marakasov 2016-10-12 09:01:17 +00:00
parent 7ad904be28
commit 44e1d9574c
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=423836
5 changed files with 49 additions and 1 deletions

View file

@ -3,13 +3,14 @@
PORTNAME= 7kaa
PORTVERSION= 2.14.6
PORTREVISION= 1
CATEGORIES= games
MASTER_SITES= SF/skfans/7KAA%20${PORTVERSION}
MAINTAINER= amdmi3@FreeBSD.org
COMMENT= Seven Kingdoms: Ancient Adversaries
LICENSE= GPLv2
LICENSE= GPLv2+
LICENSE_FILE= ${WRKSRC}/COPYING
LIB_DEPENDS= libenet.so:net/enet

View file

@ -0,0 +1,12 @@
--- src/audio/openal/openal_audio.cpp.orig 2016-09-04 17:31:41 UTC
+++ src/audio/openal/openal_audio.cpp
@@ -168,7 +168,8 @@ OpenALAudio::OpenALAudio()
OpenALAudio::~OpenALAudio()
{
- this->deinit();
+ if (this->init_flag != 0)
+ this->deinit();
}
// Initialize the mid driver

View file

@ -0,0 +1,12 @@
--- src/client/OMUSIC.cpp.orig 2015-05-19 01:00:20 UTC
+++ src/client/OMUSIC.cpp
@@ -81,7 +81,8 @@ Music::Music()
// -------- begin of function Music::~Music ---------//
Music::~Music()
{
- deinit();
+ if (init_flag != 0)
+ deinit();
}
// -------- end of function Music::~Music ---------//

View file

@ -0,0 +1,11 @@
--- src/client/OSYS.cpp.orig 2016-09-04 17:31:41 UTC
+++ src/client/OSYS.cpp
@@ -240,6 +240,8 @@ void Sys::deinit()
//-------------------------------------//
+ deinit_directx();
+
init_flag = 0;
}
//--------- End of function Sys::deinit ---------//

View file

@ -0,0 +1,12 @@
--- src/video/sdl/vga_sdl.cpp.orig 2016-09-04 17:31:41 UTC
+++ src/video/sdl/vga_sdl.cpp
@@ -58,7 +58,8 @@ VgaSDL::VgaSDL()
VgaSDL::~VgaSDL()
{
- deinit();
+ if (window != NULL)
+ deinit();
}
//-------- End of function VgaSDL::~VgaSDL ----------//