]> Pileus Git - ~andy/gtk/blobdiff - gtk/gtkwin32.c
filechooserbutton: When the combo box changes, set the *file*, not the current folder
[~andy/gtk] / gtk / gtkwin32.c
index 858216657a1cb29e786174de74f27d5db3344523..e8bd7ef133b9736dbd9e2a75293e79c65e632f14 100644 (file)
@@ -12,9 +12,7 @@
  * Lesser General Public License for more details.
  *
  * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
  */
 
 /*
 
 #include "gtkprivate.h"
 
-#ifdef G_OS_WIN32
 #define STRICT
 #include <windows.h>
 #undef STRICT
-#endif
-
-#ifdef G_OS_WIN32
 
 static HMODULE gtk_dll;
 
@@ -63,7 +57,8 @@ _gtk_get_libdir (void)
     {
       gchar *root = g_win32_get_package_installation_directory_of_module (gtk_dll);
       gchar *slash = strrchr (root, '\\');
-      if (g_ascii_strcasecmp (slash + 1, ".libs") == 0)
+      if (slash != NULL &&
+          g_ascii_strcasecmp (slash + 1, ".libs") == 0)
         gtk_libdir = GTK_LIBDIR;
       else
         gtk_libdir = g_build_filename (root, "lib", NULL);