[SCM] projectm/master: Updated userfonts patch to prevent projectM from crashing

ximion-guest at users.alioth.debian.org ximion-guest at users.alioth.debian.org
Tue Sep 28 15:54:46 UTC 2010


The following commit has been merged in the master branch:
commit d8b023f37147d3621b79236f5261f8868b9f1956
Author: Matthias Klumpp <matthias at nlinux.org>
Date:   Tue Sep 28 17:54:27 2010 +0200

    Updated userfonts patch to prevent projectM from crashing
    
    * Check if fonts exist before they're loaded.
      (Otherwise exit with error-code)

diff --git a/debian/patches/10_lprojectm_userfonts.patch b/debian/patches/10_lprojectm_userfonts.patch
index 5a3c20c..5533673 100644
--- a/debian/patches/10_lprojectm_userfonts.patch
+++ b/debian/patches/10_lprojectm_userfonts.patch
@@ -18,3 +18,28 @@ Last-Update: 2010-09-25
      #endif
  
      #ifdef WIN32
+--- a/src/libprojectM/Renderer/Renderer.cpp
++++ b/src/libprojectM/Renderer/Renderer.cpp
+@@ -45,7 +45,21 @@
+ 	this->beatDetect = beatDetect;
+ 
+ #ifdef USE_FTGL
+-	/**f Load the standard fonts */
++	/**f Load the standard fonts if they do exist */
++	
++	struct stat stFileInfo;
++	int intStat;
++	
++	intStat = stat(title_fontURL.c_str(),&stFileInfo);
++	if(intStat != 0) {
++	  std::cout "Could not open font file: " << title_fontURL << std:endl;
++	  exit(1);
++	}
++	intStat = stat(menu_fontURL.c_str(),&stFileInfo);
++	if(!intStat != 0) {
++	  std::cout "Could not open font file: " << menu_fontURL << std:endl;
++	  exit(1);
++	}
+ 
+ 	title_font = new FTGLPixmapFont(title_fontURL.c_str());
+ 	other_font = new FTGLPixmapFont(menu_fontURL.c_str());

-- 
projectm packaging



More information about the pkg-multimedia-commits mailing list