[Gpredict-svn] SF.net SVN: gpredict:[601] trunk/src/gtk-sat-map.c
Real time satellite tracking and orbit prediction
Status: Beta
                
                Brought to you by:
                
                    csete
                    
                
            | 
     
      
      
      From: <cs...@us...> - 2010-02-05 13:35:30
      
     
   | 
Revision: 601
          http://gpredict.svn.sourceforge.net/gpredict/?rev=601&view=rev
Author:   csete
Date:     2010-02-05 13:35:24 +0000 (Fri, 05 Feb 2010)
Log Message:
-----------
Applied patch 2943024: Eliminate Segfault in gtk-sat-map.c
Modified Paths:
--------------
    trunk/src/gtk-sat-map.c
Modified: trunk/src/gtk-sat-map.c
===================================================================
--- trunk/src/gtk-sat-map.c	2010-02-01 16:16:30 UTC (rev 600)
+++ trunk/src/gtk-sat-map.c	2010-02-05 13:35:24 UTC (rev 601)
@@ -1796,6 +1796,15 @@
 
     obj = SAT_MAP_OBJ (g_hash_table_lookup (satmap->obj, catnum));
 
+    if (obj == NULL) {
+        /* FIXME: protection against this should be implemented in the module. */
+        sat_log_log (SAT_LOG_LEVEL_ERROR,
+                     _("%s:%d: NULL object for %d (yes, this is a bug)"),
+                     __FILE__, __LINE__, sat->tle.catnr);
+
+        return;
+    }
+
     if (obj->selected) {
         /* update satmap->sel */
         update_selected (satmap, sat);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
 |