Browse Source

Fixed slop from segfaulting.

Dalton Nell 9 years ago
parent
commit
8a03f9a24c
1 changed files with 5 additions and 5 deletions
  1. 5
    5
      src/main.cpp

+ 5
- 5
src/main.cpp View File

186
     if ( err != EXIT_SUCCESS ) {
186
     if ( err != EXIT_SUCCESS ) {
187
         return EXIT_FAILURE;
187
         return EXIT_FAILURE;
188
     }
188
     }
189
-    if ( !slop::isRectangleSupported() ) {
190
-        fprintf( stderr, "Error: Your X server doesn't support the XShape extension. There's nothing slop can do about this!\n" );
191
-        fprintf( stderr, "  Try updating X and making sure you have XExtensions installed. (/usr/lib/libXext.so, /usr/include/X11/extensions/shape.h)\n" );
192
-        return EXIT_FAILURE;
193
-    }
194
     int state = 0;
189
     int state = 0;
195
     bool running = true;
190
     bool running = true;
196
     slop::Rectangle* selection = NULL;
191
     slop::Rectangle* selection = NULL;
255
         printSelection( format, true, 0, 0, 0, 0, None );
250
         printSelection( format, true, 0, 0, 0, 0, None );
256
         return EXIT_FAILURE;
251
         return EXIT_FAILURE;
257
     }
252
     }
253
+    if ( !slop::isRectangleSupported() ) {
254
+        fprintf( stderr, "Error: Your X server doesn't support the XShape extension. There's nothing slop can do about this!\n" );
255
+        fprintf( stderr, "  Try updating X and making sure you have XExtensions installed. (/usr/lib/libXext.so, /usr/include/X11/extensions/shape.h)\n" );
256
+        return EXIT_FAILURE;
257
+    }
258
     err = xengine->grabCursor( slop::Cross );
258
     err = xengine->grabCursor( slop::Cross );
259
     if ( err != EXIT_SUCCESS ) {
259
     if ( err != EXIT_SUCCESS ) {
260
         printSelection( format, true, 0, 0, 0, 0, None );
260
         printSelection( format, true, 0, 0, 0, 0, None );